diff options
author | Andrew White <andrew.white@unboxedconsulting.com> | 2016-04-23 19:34:54 +0100 |
---|---|---|
committer | Andrew White <andrew.white@unboxedconsulting.com> | 2016-04-23 19:34:54 +0100 |
commit | ee5e476aad791e41c97f2a833f41bb5899d5252b (patch) | |
tree | 45ad466560b97f542222d97432f1cca9c793dc5a /activesupport/test/core_ext/bigdecimal_test.rb | |
parent | a424bbb2423297cc8bd80fc8b36f7169c3986a71 (diff) | |
download | rails-ee5e476aad791e41c97f2a833f41bb5899d5252b.tar.gz rails-ee5e476aad791e41c97f2a833f41bb5899d5252b.tar.bz2 rails-ee5e476aad791e41c97f2a833f41bb5899d5252b.zip |
Make getlocal and getutc always return instances of Time
Previously these methods could return either a DateTime or a Time
depending on how the ActiveSupport::TimeWithZone instance had
been constructed. Changing to always return an instance of Time
eliminates a possible stack level too deep error in to_time where
it was wrapping a DateTime instance.
As a consequence of this the internal time value is now always an
instance of Time in the UTC timezone, whether that's as the UTC
time directly or a representation of the local time in the timezone.
There should be no consequences of this internal change and if
there are it's a bug due to leaky abstractions.
Diffstat (limited to 'activesupport/test/core_ext/bigdecimal_test.rb')
0 files changed, 0 insertions, 0 deletions