diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/time/zones.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/time/zones.rb b/activesupport/lib/active_support/core_ext/time/zones.rb index 7b9106b4ac..33c7800705 100644 --- a/activesupport/lib/active_support/core_ext/time/zones.rb +++ b/activesupport/lib/active_support/core_ext/time/zones.rb @@ -9,8 +9,10 @@ module ActiveSupport #:nodoc: end module ClassMethods + attr_accessor :zone_default + def zone - Thread.current[:time_zone] + Thread.current[:time_zone] || zone_default end # Sets a global default time zone, separate from the system time zone in ENV['TZ']. |