Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Samuel Magondu Njenga itsMagondu

🎯
Focusing
View GitHub Profile
@squioc
squioc / gist:3078803
Created Jul 9, 2012
conversion between iso8601 date format and unix epoch datetime
View gist:3078803
from datetime import datetime
import calendar
def epoch_to_iso8601(timestamp):
"""
epoch_to_iso8601 - convert the unix epoch time into a iso8601 formatted date
>>> epoch_to_iso8601(1341866722)
'2012-07-09T22:45:22'
"""
You can’t perform that action at this time.