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.
|