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

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -