Converting to UTC fails for some scenarios

Sep 23, 2009 at 1:15 PM


When I tried to convert a local time Oct-25-2009, 1AM  in Europe/London to UTC, I am getting UTC time as Oct-25-2009, 00:00(Midnight), instead of Oct-25-2009, 1AM





Sep 24, 2009 at 6:51 AM

Hi Rajeesh,

There may well be an issue with the UTC conversion not being correct at the exact moment of cut-over. It is interesting since technically the clock hits 1AM twice on this day. So you could argue that both values for the conversion are correct - although I am not arguing that.

Interested in your thoughts.


Sep 24, 2009 at 7:16 AM

Thanks Mark,

I understood the reason, is there any work around to solve this issue.

A quick thought - if date time has got a flag which indicates DST is applied for that date or not, will that solve the issue?

Another thing I found is - in ConvertToTimeSpan(...) method, "s" or "u" postfix are ingored, but when I looked into the PublicDomain code, it is doing some calculation based on that characters, will this create any problem?

Actually, I am working on a project which requires datetim conversion from one zone to another, so we where looking for a perfect library which will work for all the time zones. I am stuck with this for the last few days.