fonctions.py 194 Bytes
Newer Older
Administrator committed
1 2 3 4 5 6 7 8
import datetime, pytz

tz = pytz.timezone("Europe/Paris")

def dateIsoUTC(myDate):

    tDate = tz.localize(datetime.datetime.strptime(myDate, '%Y-%m-%d %H:%M:%S'))
    return dDate.isoformat()