Vote count:
0
I am a very new programmer and I need help adjusting the following python code so that it will adjust the unix time pulled in from a database to the local browser time(date actually):
SCRIPT:
def format_utc(self, timestamp): return datetime.datetime.fromtimestamp(int(timestamp)).strftime('%m/%d/%Y')
It currently only pulls the original unix time and converts it to UTC instead of local. Any help would be very appreciated!!
asked 21 secs ago
show local time in HTML from python
Aucun commentaire:
Enregistrer un commentaire