[Python-Dev] Issue 2736: datetimes and Unix timestamps (original) (raw)

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Jun 5 20:14:50 CEST 2012


On Tue, Jun 5, 2012 at 1:41 PM, Guido van Rossum <guido at python.org> wrote:

What do they want to set the dst flag for?

To shift the responsibility to deal with the DST ambiguity to the user. This is what POSIX mktime with varying degree of success.

I think I am advocating for the former but without the dst flag.

The cost of dst flag is low and most users will ignore it anyways, but by providing it we will at least acknowledge the issue. I don't care much one way or another.

The remaining issue is the return type. Most of the use cases that have been brought up cast the timestamp to int as soon as it is computed. I recall a recent discussion about high-presision timestamps, but don't recall the conclusion. I guess we should offer timestamp() returning float and let those who care about range or precision write their own solution.



More information about the Python-Dev mailing list