"A Twitter user who posted a "joke" bomb threat against a UK airport could be jailed after pleading guilty to sending a menacing message...[he] has already been suspended from work and banned from Robin Hood Airport for life"
The whole story here
What a plonker.
Monday, 22 February 2010
Thursday, 4 February 2010
Converting from local to UTC in C#
Its one of thse things that should be easy.
However if you get your DateTime from a database it will be anonymous, i.e. it will not have its kind set.
So, do this:
DateTime ConvertFromLocalToUTC(DateTime localTime)
{
DateTime anon = new DateTime(localTime.Ticks, DateTimeKind.Local);
DateTime dtUTC = anon.ToUniversalTime();
return dtUTC;
}
Oh, and, in other news, happy Imbolc!
However if you get your DateTime from a database it will be anonymous, i.e. it will not have its kind set.
So, do this:
DateTime ConvertFromLocalToUTC(DateTime localTime)
{
DateTime anon = new DateTime(localTime.Ticks, DateTimeKind.Local);
DateTime dtUTC = anon.ToUniversalTime();
return dtUTC;
}
Oh, and, in other news, happy Imbolc!
Subscribe to:
Posts (Atom)