Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get UTC time
#1
Hi,
I use below code

from datetime import datetime
print(datetime.utcnow())
my output as below:
2021-12-26 00:25:14.083291

but I want like this: 2021-12-26T00:25:14.083291+0800
can any one suggest how to achieve this.
Reply


Messages In This Thread
How to get UTC time - by SriRajesh - Dec-26-2021, 12:27 AM
RE: How to get UTC time - by snippsat - Dec-26-2021, 12:56 AM
RE: How to get UTC time - by SriRajesh - Dec-26-2021, 03:00 AM
RE: How to get UTC time - by ndc85430 - Dec-26-2021, 04:21 AM
RE: How to get UTC time - by snippsat - Dec-26-2021, 12:27 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020