Created
March 30, 2012 05:58
-
-
Save sgharms/2247121 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
1.9.3p125 :070 > date => "03/26/2012 08:08:34 UTC" | |
1.9.3p125 :074 > DateTime.strptime(date,"%m/%d/%Y %H:%M:%S %Z").to_s => "2012-03-26T08:08:34+00:00" | |
1.9.3p125 :076 > DateTime.strptime(date,"%m/%d/%Y %H:%M:%S %z").strftime("%a %b %e %l:%M:%S %Z %Y") | |
=> "Mon Mar 26 8:08:34 +00:00 2012" | |
But I want... | |
Mon Mar 26 08:08:34 UTC 2012 | |
I seem to be missing a tiny something.... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment