Created
March 9, 2012 02:43
-
-
Save dchentech/2004712 to your computer and use it in GitHub Desktop.
parse nginx $time_local in ruby
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
DateTime.strptime("08/Mar/2012:11:53:53 +0800", "%d/%b/%Y:%H:%M:%S %z") | |
# => Thu, 08 Mar 2012 11:53:53 +0800 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment