Turn OFF Daglight saving time in Rails app

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

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