I am seeing some strange results whilst trying to retrieve the time zone for Ireland.
On Mac OS X (without tzinfo-data)
include ActionView::Helpers::FormOptionsHelper
time_zone_options_for_select.split.select { |opt| opt =~ /Dublin/ }
=> ["value=\"Dublin\">(GMT+00:00)", "Dublin</option>"]
Then on Ubuntu I get:
=> ["value=\"Dublin\">(GMT+01:00)", "Dublin</option>"]
Then, on Mac OS X with 'tzinfo-data' I get:
=> ["value=\"Dublin\">(GMT+01:00)", "Dublin</option>"]
Ireland is GMT+0 (the offsets don't include DST, London is currently report +0 and Madrid +1, but as I write both as those are using +1 and +2 (BST and CEST))
Why am I getting GMT+1 on Ubuntu or with tzinfo-data?
Edit:
Ok, I have some results without rails
Using tzinfo-data
1.2018.4
> require 'tzinfo/data'
> TZInfo::Timezone.get('Europe/Dublin').current_period.utc_offset
=> 0
using tzinfo-data
1.2018.5
> require 'tzinfo/data'
> TZInfo::Timezone.get('Europe/Dublin').current_period.utc_offset
=> 3600
I found the problem. It turns out the Ireland actually uses a negative offset in winter, not a positive offset in summer (it's currently the only country in the world to do this).
The latest IANA timezone release 2018f correctly uses a negative offset for Ireland, while earlier (released) versions were using a different base timezone and a positive offset during summer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With