Turn OFF Daglight saving time in Rails app

30 views
Skip to first unread message

Dinesh Atoliya

unread,
Oct 30, 2013, 10:00:38 AM10/30/13
to rubyonra...@googlegroups.com
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

Robert Walker

unread,
Nov 4, 2013, 9:16:53 AM11/4/13
to rubyonra...@googlegroups.com
Dinesh Atoliya wrote in post #1126155:
> 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

--
Posted via http://www.ruby-forum.com/.
Reply all
Reply to author
Forward
0 new messages