You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LocalDateTime class returns wrong time zone differential for Ireland/Dublin time zone during winter time.
TZD returned by LocalDateTime is 7200 but std::tm::tm_gmtoff value is 0 during winter time. The issue is from my point of view relying on DST being always positive but Ireland has special Winter time - see Wikipedia where daylight saving time is used in winter and goes 1 hour back in time.
LocalDateTime
class returns wrong time zone differential for Ireland/Dublin time zone during winter time.TZD returned by
LocalDateTime
is 7200 butstd::tm::tm_gmtoff
value is 0 during winter time. The issue is from my point of view relying on DST being always positive but Ireland has special Winter time - see Wikipedia where daylight saving time is used in winter and goes 1 hour back in time.Simple test can be made to test it on Linux:
The above example always throws exception for the given time zone.
My suggestion would be to not use
timezone
external variable from<time.h>
inTimezone
class but rather calculate utcOffset directly, like:Pull request (3509) with unit tests created.
The text was updated successfully, but these errors were encountered: