Reputation: 10208
I want to convert DateTime.Today
to GMT time.
i.e. If I am in L.A. and it is 11pm of 22/02/2012 I want DateTime.Today to be 23/02/2012 because it will be that day in GMT time.
Upvotes: 68
Views: 51417
Reputation: 1
DateTime LocalToGMT = DateTime.Now.ToUniversalTime().AddHours(TimeZoneInfo.FindSystemTimeZoneById("GMT Standard Time").BaseUtcOffset.Hours);
Upvotes: -1
Reputation: 4558
There is no DateTime.UtcToday
, but you can try DateTime.UtcNow.Date
Upvotes: 187