time-zone Blogs
Written by Kiprosh, team of passionate and disciplined craftsmen turning your ideas into reality.
Kiprosh is now part of LawLytics
Written by Kiprosh, team of passionate and disciplined craftsmen turning your ideas into reality.
How to work with time-zone in rails Time-zone leaks: This is an issue where time-zone of one request is passed to another request. Ex Scenario: Lets say we have web-server running on a single dyno and we have three different users with different timezones('Mumbai', 'Central America' and 'London'). Here is my code setup that will produce time-zone leaks, class UserController def method_one_with_time_zone puts Time.zone #before_filter sets the time zone for this method execution. end def method_two_without_time_zone puts Time.zone #This method doesn't call any before filter, So it will