I have the following string
date = "Thu May 08 2014 12:06:43 GMT+0300 (EEST)"
How can I turn it in to a valid python datetime object using stptime?
I did this
datePy = datetime.strptime(date, "%a, %d %b %Y %H:%M:%S (%Z)")
but didn't work. The traceback
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/_strptime.py", line 325, in _strptime
(data_string, format))
ValueError: time data 'Thu May 08 2014 12:06:43 GMT+0300 (EEST)' does not match format '%a, %d %b %Y %H:%M:%S (%Z)'
For some background details I get the date string from javascript Date.toString()
function send it to my django back end and want to turn it to python datetime object that is naive.