I need to format date/time with a correct time zone and using this format string: %Y-%m-%dT%H:%M:%S
. However, it's using local time. How can I make it format time including time zone, or using UTC time?
Asked
Active
Viewed 1,053 times
0

user626528
- 13,999
- 30
- 78
- 146
1 Answers
0
You can add the timezone with %Z or %z.
strftime can only generate local time.

b0ti
- 2,319
- 1
- 18
- 18
-
This option doesn't work correctly, at least on Windows. It always outputs textual time zone name only. – user626528 Feb 19 '15 at 13:24