Different summer and winter time within same timezone in Rails 5

Viewed 90

I run a Rails 5 app in Brazil. So the timezone is set to America/Sao_Paulo. Now I have the problem that inside this timezone there are some regions that have summer time (e.g. Sao Paulo) and some don't (e.g. Salvador). So even the regions are in the same timezone they have different local times.

I don't know if this is also the case in other regions of the world. How do I handle this if I want to convert a time to Salvador time? I can do it manually by adding or subtracting on hour based on the region timezone, but is there a better way?

UPDATE:

I found this article: https://blog.bigbinary.com/2017/07/18/rails-5-1-returns-unmapped-timezones-from-activesupport-timezone-country_zones.html

So I tried to set Time.zone = "America/Bahia" and it worked.

I don't know if this now is Ruby or RoR...

0 Answers
Related