New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dublin offset changed between 1.2018.4 and 1.2018.5 #95
Comments
I found the issue. 2018f uses a negative offset for Irish Winter Time, whereas earlier versions used a positive offset for "Irish Summer Time" (which doesn't actually exist). Technically the negative offset for Irish Winter Time is correct. |
How is this not still an issue?
From what I can read in the code method "utc_offset" should return the base offset, i.e. 0 for this zone regardless of the time of year. Method "std_offset" should return the difference in seconds between the current period offset relative to the base offset. The numbers I get are thus just plain wrong. This is a bug in my view. I use TZinfo version 1.2.5. |
Any thoughts on this? |
@P9GIT Ireland is 3600 offset from UTC, and they don't have summer daylight saving. Instead in winter they subtract 3600 seconds. This is exceedingly rare, and I hadn't come across this before: https://en.wikipedia.org/wiki/Winter_time_(clock_lag) The upshot of this is that the time in Ireland is identical the time in the UK, but the base offsets are different. The UK is UTC + 0, and they add 3600 during summer. Ireland is UTC + 3600, and they subtract 3600 during winter. |
@P9GIT @samstickland is correct, Europe/Dublin applies negative daylight savings in the winter. This isn't a bug. t = TZInfo::Timezone.get('Europe/Dublin')
winter = t.period_for(Time.utc(2019, 1, 1))
winter.utc_offset
# => 3600
winter.std_offset
# => -3600
winter.dst?
# => true
summer = t.period_for_utc(Time.utc(2019, 7, 1))
summer.utc_offset
# => 3600
summer.std_offset
# => 0
summer.dst?
# => false The commentary regarding Ireland in the IANA Time Zone Database states the following on the matter:
|
I see. Weird that they chose to be "different" from the normal DST procedure... Thanks for the explanation! |
Using
tzinfo-data
1.2018.4using
tzinfo-data
1.2018.5Of course, the offset in Dublin hasn't changed!
The text was updated successfully, but these errors were encountered: