Created
June 10, 2013 09:23
-
-
Save greggyNapalm/5747514 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
>>> from datetime import datetime | |
>>> s = '[07/Jun/2013:04:48:36 +0400]' | |
>>> datetime.strptime(s, '[%d/%b/%Y:%H:%M:%S %z]') | |
Traceback (most recent call last): | |
File "<input>", line 1, in <module> | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_strptime.py", line 317, in _strptime | |
(bad_directive, format)) | |
ValueError: 'z' is a bad directive in format '[%d/%b/%Y:%H:%M:%S %z]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment