I would want to get current UTC time formatted to HH:MM:SS
. What is the easiest way to do it?
Asked
Active
Viewed 152 times
1 Answers
-1
from datetime import datetime
datetime.utcnow().strftime("%H:%M:%S")
(answer updated and improved thanks for comments)

Viljami
- 639
- 7
- 15
-
7...or just `datetime.now().strftime("%H:%M:%S")`? This seems needlessly hacky. – Aplet123 Feb 26 '21 at 11:51
-
2this doesn't return UTC neither – FObersteiner Feb 26 '21 at 12:06