diff options
author | Grzegorz Witek <arnvald.to@gmail.com> | 2015-11-15 01:04:28 +0800 |
---|---|---|
committer | Grzegorz Witek <arnvald.to@gmail.com> | 2016-01-22 09:25:28 +0800 |
commit | a3ddd5f1572f6ebf95f4c0a789413ee1b2ecbab5 (patch) | |
tree | 07ab0ac46ff35676fa754989ee031b6a93eb70be /activerecord/test/cases/statement_cache_test.rb | |
parent | 9a99c7cef533e985e67af5de0e65a39f452b7db9 (diff) | |
download | rails-a3ddd5f1572f6ebf95f4c0a789413ee1b2ecbab5.tar.gz rails-a3ddd5f1572f6ebf95f4c0a789413ee1b2ecbab5.tar.bz2 rails-a3ddd5f1572f6ebf95f4c0a789413ee1b2ecbab5.zip |
Use correct timezone when parsing date in json
Fixes https://github.com/rails/rails/issues/22171
Time specified in ISO 8601 format without `Z` should be considered as local
time, yet until now it was treated as UTC.
This commit fixes problem by parsing time using timezone specified in
application config.
The downside of this solution is performance hit (`Time.zone.parse` is ~ 1.6x
slower than `Time.parse`), so maybe there's a better solution.
Diffstat (limited to 'activerecord/test/cases/statement_cache_test.rb')
0 files changed, 0 insertions, 0 deletions