Hi Cyrille,
TimeZone class doesn't implement DST rules, but TimeWithZone class
does.
To get the DST offset use the TimeWithZone class
>> Time.current.utc_offset
=> 46800
But if you do the following its uses the TimeZone class
>> Time.zone.utc_offset
=> 43200
The conversation around this ticket explains its
https://rails.lighthouseapp.com/projects/8994/tickets/3037
Paul
On Nov 4, 5:51 pm, Cyrille <cbonne...@gmail.com> wrote:
> Hi guys,
> Is UTC offset not working or am I looking at the wrong thing?
> >> ActiveSupport::TimeZone.new("Wellington").utc_offset
> => 43200
> 43200/3600 = 12 hours
> We are currently 13 hours ahead of UTC:http://www.timeanddate.com/worldclock/city.html?n=264
> This is with Rails 2.2.2 and ruby 1.8.7 (2009-06-12 patchlevel 174)
> [i686-darwin9.8.0], MBARI 0x8770, Ruby Enterprise Edition 20090928
> Cheers.