Created
September 3, 2012 22:13
-
-
Save groman-me/3614049 to your computer and use it in GitHub Desktop.
Get time in current time zone
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.local returns time in Time zone of your machine: | |
Time.local(2012,8,31) | |
# => Fri Aug 31 00:00:00 +0400 2012 | |
# Time.zone.local returns time in Time zone of your application | |
Time.zone.local(2012,10,31) | |
# => Wed, 31 Oct 2012 00:00:00 EET +02:00 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment