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.
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.
There is no DateTime.UtcToday
, but you can try DateTime.UtcNow.Date
DateTime LocalToGMT = DateTime.Now.ToUniversalTime().AddHours(TimeZoneInfo.FindSystemTimeZoneById("GMT Standard Time").BaseUtcOffset.Hours);