View Single Post
Old 01-22-2008, 11:59 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,382
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No the problem is the weird date format
Code:
2008-01-21T14:00:00+01:00
The simple way to fix it is to set
Code:
use_pubdate = False
The more correct way to fix it is to override the strptime function

Code:
def strptime(self, raw):
   return calendar.timegm(time.strptime('%Y-%m-%dT%H:%M:%S+01:00', raw))-3600
You might have to play with the above strptime to get it to parse the date correctly.

Last edited by kovidgoyal; 01-23-2008 at 12:03 AM.
kovidgoyal is offline   Reply With Quote