Created
October 29, 2014 17:15
-
-
Save viniciussbs/81f0a75b8ee43e661881 to your computer and use it in GitHub Desktop.
Some tests with ActiveSupport::TimeZone in Rails 4.2.0.beta2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|------------------------------------------------------------+----------------------------------------+------------------------------------------------------+ | |
| Time.now.at_beginning_of_day | Time.now | Time.now.at_end_of_day | | |
| 2014-10-29 00:00:00 -0200 | 2014-10-29 14:25:24 -0200 | 2014-10-29 23:59:59 -0200 | | |
|------------------------------------------------------------+----------------------------------------+------------------------------------------------------+ | |
| Time.now.at_beginning_of_day.in_time_zone("Brasilia") | Time.now.in_time_zone("Brasilia") | Time.now.at_end_of_day.in_time_zone("Brasilia") | | |
| Wed, 29 Oct 2014 00:00:00 BRST -02:00 | Wed, 29 Oct 2014 14:42:46 BRST -02:00 | Wed, 29 Oct 2014 23:59:59 BRST -02:00 | | |
|------------------------------------------------------------+----------------------------------------+------------------------------------------------------+ | |
| Time.zone.now.at_beginning_of_day | Time.zone.now | Time.zone.now.at_end_of_day | | |
| Wed, 29 Oct 2014 00:00:00 UTC 00:00 | Wed, 29 Oct 2014 16:58:09 UTC 00:00 | Wed, 29 Oct 2014 23:59:59 UTC 00:00 | | |
|------------------------------------------------------------+----------------------------------------+------------------------------------------------------+ | |
| Time.zone.now.at_beginning_of_day.in_time_zone("Brasilia") | Time.zone.now.in_time_zone("Brasilia") | Time.zone.now.at_end_of_day.in_time_zone("Brasilia") | | |
| Tue, 28 Oct 2014 22:00:00 BRST -02:00 | Wed, 29 Oct 2014 14:58:58 BRST -02:00 | Wed, 29 Oct 2014 21:59:59 BRST -02:00 | | |
|------------------------------------------------------------+----------------------------------------+------------------------------------------------------+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment