Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

Chris Angelico rosuav at gmail.com
Sat Apr 16 18:53:36 EDT 2022


On Sun, 17 Apr 2022 at 08:37, Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
> And proposals to make
> DST permanent year round -- so "noon" (1200hrs) is not "noon" (sun at
> zenith) pretty much anywhere.
>

Noon isn't precisely zenith anyway, for several reasons:

1) Time zones synchronize their clocks on the mean noon at some
location. Usually that's approximately close to the most populous part
of the region, but not always - for instance, all of China is on one
timezone, despite spanning 4-5 hours' worth of solar noon.

2) Solar noon migrates around a bit during the year. I don't remember
the exact figures, but if you want to read a sundial with any
precision, you need to take a date-based adjustment.

3) Solar days aren't all 24 hours long anyway.

The clock and calendar should *roughly* correspond to the sun, in that
broadly speaking, 2AM will be in darkness and 2PM will be in sunlight,
and the solstices will land in June and December. But down to the
minute, it's much more useful to synchronize on atomic time than
astronomical.

ChrisA


More information about the Python-list mailing list