TimeZoneInfo Ambiguously an hour before

Working with TimeZoneInfo I'm having a problem. It may just be a matter of understanding the ideas that Microsoft has contributed to TimeZoneInfo.

The problem is that if I ran these lines of code:

var tzi = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time"); bool result = tzi.IsAmbiguousTime(new DateTime(2013, 11, 3, 1, 15, 0)); 

The result is correct.

November 3, we must return to normal time with summer savings, so at 2: 59: 5999999 the time will change at 2:00:00

So why is the time stamp 01:15:00 ambiguous?

+4
source share
1 answer

Your expression is incorrect: the time will be changed at 02:00 local time (which means: EDT) and will shift back to 01:00 EST. This means that there will be two instances of 01:15:00, so the result should be expected.

Wikipedia :

On the first Sunday of November, at 2:00 AM Eastern time, the clock returned at 1:00 AM EST, thus "duplicating" one hour.

It is interesting to note that you can eliminate the ambiguity between them by explicitly indicating whether the time is EDT or EST.

+3
source

Source: https://habr.com/ru/post/1483364/


All Articles