[Datetime-SIG] Computing .dst() as a timedelta

Alexander Belopolsky alexander.belopolsky at gmail.com
Mon Sep 21 18:20:23 CEST 2015


On Mon, Sep 21, 2015 at 11:49 AM, M.-A. Lemburg <mal at egenix.com> wrote:
>
> Looks like assigning a "time zone" to the place is simply conceptually
> wrong and was just done to make some tz folks happy.


Yes, the best definition of "time zone" in computing contexts is the one
given by the tzdist group: "A description of the past and predicted future
timekeeping practices  of a collection of clocks that are intended to
agree."   Apparently, there is no concerted effort at the Troll station to
have a station-specific set of timekeeping rules.  They just use either UTC
or Europe/Oslo depending on the needs of the current expedition.

>
> Anyway, the main takeaway for me is that it is obviously possible
> to have more than two DST switches during the year, which is
> something I wasn't aware of before seeing this example.

The March 1st switch at Troll from UTC to CET is not really a DST
transition.  It is a transition that changes the standard time.  (The value
of isdst does not change in the transition.)

Even more exotic things can happen if one would try to model a ship's clock
using a tzinfo instance.  By convention, ships use the time of the closest
port or whatever the captain feels appropriate in international waters.
Since ship logs are usually reliable and ship speed is low, such specialty
application will probably work in most cases.  Note that faster vehicles
such as the ISS use UTC these days, but I think the Apollo program used the
Houston time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150921/5f31ee92/attachment-0001.html>


More information about the Datetime-SIG mailing list