python get utc time

44

python - oordinated universal time -

from datetime import datetime, timezone
print(datetime.now())              # timezone
print(datetime.now(timezone.utc))  # coordinated universal time 

Comments

Submit
0 Comments