[Django]-Python datetime.today() Showing different time in different python programms

3👍

Your offset of 5 and a half hours between the two results indicates you are probably located in India, and you found an issue with timezones. Try using datetime.utcnow() instead, and continue from there.

https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow

👤sarema

Leave a comment