Forum: Ruby on Rails Turn OFF Daglight saving time in Rails app

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
741b8dd0ba8f8b40dd1351b0548fc60e?d=identicon&s=25 Dinesh Atoliya (Guest)
on 2013-10-31 08:25
(Received via mailing list)
Hello Guys,

Is there any way that we can turn off DayLight saving in rails app?
Rails uses tzinfo gem for converting time in zones but it does not
handle
it  correctly for some timezone. Is there any way we can turn OFF
DayLight
saving completly ?

Thanks
280b78a61a968391b7e07e912be102a8?d=identicon&s=25 Robert Walker (robert4723)
on 2013-11-04 15:16
Dinesh Atoliya wrote in post #1126155:
> Is there any way that we can turn off DayLight saving in rails app?
> Rails uses tzinfo gem for converting time in zones but it does not
> handle
> it  correctly for some timezone. Is there any way we can turn OFF
> DayLight
> saving completely ?

First I would recommend finding out what time zone data is being used
and make sure it's up-to-date. Turning off daylight saving time doesn't
seem like the right solution to your problem. Turning off daylight
savings time might get the time right in one time zone only to make it
wrong for everyone else. That would only work if you expect all your
users to live within the "broken" time zone.

There are a couple of options for supplying the tzinfo gem with data as
described here:

http://tzinfo.github.io

Maybe just using a different time zone database would fix your problem
rather than using an ugly hack as you're suggesting. You might be able
to build a database from the IANA database. Or, have your confirmed that
their data is wrong for the time zones in question?

http://www.iana.org/time-zones
This topic is locked and can not be replied to.