converting JSON python time to regular time -


i have following python time value in json format...any inputs on how convert to regular time format

u'lastupdated': 1358294533 

datetime.fromtimestamp datetime module should it.

for example:

>>> datetime import datetime >>> d = datetime.fromtimestamp(1358294533) >>> d.isoformat() '2013-01-15t19:02:13' 

for getting more controlled string representation of datetime use datetime.strftime function.


Comments

Popular posts from this blog

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -