What exactly does the T and Z mean in timestamp?

后端 未结 1 2084
遥遥无期
遥遥无期 2020-12-02 13:07

I have this timestamp value being return by a web service \"2014-09-12T19:34:29Z\"

I know that it means timezone, but what exactly does it mean?

<
相关标签:
1条回答
  • 2020-12-02 13:27

    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.

    0 讨论(0)
提交回复
热议问题