1from datetime import datetime
2
3# time_in_utc variable will be the utc time
4time_in_utc = datetime.utcnow()
5
6# If you want to make it more fancier:
7formatted_time_in_utc = time_in_utc.strftime("%d/%m/%Y %H:%M:%S")
1from datetime import datetime, timezone
2print(datetime.now()) # timezone
3print(datetime.now(timezone.utc)) # coordinated universal time