Convert the time.struct_time object into a datetime.datetime object:

/ Published in: Django
Save to your folder(s)

Copy this code and paste it in your HTML
  1. from time import mktime
  2. from datetime import datetime
  3. dt = datetime.fromtimestamp(mktime(item['updated_parsed']))


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.