Skip to content
  • Alexey Shein's avatar
    a611a813
    Do not cache ActiveSupport::TimeZone#utc_offset · a611a813
    Alexey Shein authored
    
    
    This can be an issue when TZInfo::TimeZone#current_period is refreshed
    due to timezone period transition, but it's not reflected in
    ActiveSupport::TimeZone object.
    
    For example, on Sun, 26 Oct 2014 22:00 UTC, Moscow changed its TZ from
    MSK +04:00 to MSK +03:00 (-1 hour). If ActiveSupport::TimeZone['Moscow']
    happens to be initialized just before the timezone transition, it will
    cache its stale utc_offset even after the timezone transition.
    
    This commit removes cache and fixes this issue.
    
    Signed-off-by: default avatarJeremy Daer <jeremydaer@gmail.com>
    a611a813
    Do not cache ActiveSupport::TimeZone#utc_offset
    Alexey Shein authored
    
    
    This can be an issue when TZInfo::TimeZone#current_period is refreshed
    due to timezone period transition, but it's not reflected in
    ActiveSupport::TimeZone object.
    
    For example, on Sun, 26 Oct 2014 22:00 UTC, Moscow changed its TZ from
    MSK +04:00 to MSK +03:00 (-1 hour). If ActiveSupport::TimeZone['Moscow']
    happens to be initialized just before the timezone transition, it will
    cache its stale utc_offset even after the timezone transition.
    
    This commit removes cache and fixes this issue.
    
    Signed-off-by: default avatarJeremy Daer <jeremydaer@gmail.com>
Loading