Is Python's time.time() timezone specific?

后端 未结 6 1398
孤街浪徒
孤街浪徒 2021-02-05 00:42

Apologies for asking too basic question but I couldn\'t get it cleared after reading docs. It just seems that I am missing or have misunderstood something too basic here.

<
6条回答
  •  青春惊慌失措
    2021-02-05 01:26

    The return value should be the same, since it's the offset in seconds to the UNIX Epoch.

    That being said, if you convert it to a Date using different timezones, the values will, of course, differ.

    If, from those Dates, you convert each of them to UTC, then the result has to be the same.

提交回复
热议问题