Created
February 18, 2013 00:11
-
-
Save avit/4974312 to your computer and use it in GitHub Desktop.
Ruby Time DST
This file contains hidden or 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
std = Time.local(2013, 11, 3, 01, 00, 00) | |
# => 2013-11-03 01:00:00 -0800 | |
dst = std - 3600 | |
# => 2013-11-03 01:00:00 -0700 | |
## Challenge: | |
# Is it possible to instantiate a time in the last hour of DST (01:00 - 01:59) | |
# without first having to create a nearby time to subtract from? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment