View Single Post
Old 11-12-2014, 09:35 PM   #2
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,423
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You dont pass in a string date, you pass in a parsed time struct.

Use

import time
article.date = time.strftime(...)

EDIT: And IIRC to change the actual displayed date, you set formatted_date, not date (date is used internally to expire old articles and so on). And formatted date accepts a unicode string.

Last edited by kovidgoyal; 11-12-2014 at 09:41 PM.
kovidgoyal is offline   Reply With Quote