Skip to content

Instantly share code, notes, and snippets.

@avit
Created February 18, 2013 00:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avit/4974312 to your computer and use it in GitHub Desktop.
Save avit/4974312 to your computer and use it in GitHub Desktop.
Ruby Time DST
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