UTC to ISO 8601: 1

UTC to ISO 8601:

import datetime
>>> 2020-03-20T01:30:08.180856

Here is what the above code is Doing:
1. We import the datetime module.
2. We call the datetime.datetime.utcnow() function to get the current UTC time.
3. We call the isoformat() method on the datetime object to get a string representation of the time.

Similar Posts