The Python Oracle

What exactly does the T and Z mean in timestamp?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Magical Minnie Puzzles

--

Chapters
00:00 Question
00:45 Accepted answer (Score 228)
01:28 Thank you

--

Full question
https://stackoverflow.com/questions/2928...

Accepted answer links:
[ISO 8601 combined date-time format]: http://en.wikipedia.org/wiki/ISO_8601#Co...
[Coordinated Universal Time (UTC)]: http://en.wikipedia.org/wiki/Time_zone#U...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #datetime #timestamp #strftime #rfc3339

#avk47



ACCEPTED ANSWER

Score 255


The T doesn't really stand for anything. It is just the separator that the ISO 8601 combined date-time format requires. You can read it as an abbreviation for Time.

The Z stands for the Zero timezone, as it is offset by 0 from the Coordinated Universal Time (UTC).

Both characters are just static letters in the format, which is why they are not documented by the datetime.strftime() method. You could have used Q or M or Monty Python and the method would have returned them unchanged as well; the method only looks for patterns starting with % to replace those with information from the datetime object.