Created
March 31, 2010 23:41
-
-
Save ice799/351104 to your computer and use it in GitHub Desktop.
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
irb(main):021:0> Time.now.zone | |
=> "UTC" | |
irb(main):022:0> Time.now.utc? | |
=> false | |
### and also: | |
irb(main):005:0> Time.now.iso8601 | |
=> "2010-03-31T23:46:20+00:00" | |
irb(main):006:0> Time.now.utc.iso8601 | |
=> "2010-03-31T23:46:24Z" | |
### ? |
$ jirb
irb(main):001:0> Time.now
=> Wed Mar 31 23:55:24 UTC 2010
irb(main):002:0> Time.now.gmtime
=> Wed Mar 31 23:55:27 UTC 2010
irb(main):003:0> Time.now.utc?
=> true
irb(main):004:0> Time.now.gmtime.utc?
=> true
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
irb(main):013:0> Time.now
=> Wed Mar 31 23:52:23 +0000 2010
irb(main):014:0> Time.now.gmtime
=> Wed Mar 31 23:52:26 UTC 2010
irb(main):015:0> Time.now.utc?
=> false
irb(main):016:0> Time.now.gmtime.utc?
=> true