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

M.-A. Lemburg mal at egenix.com
Tue Sep 22 18:12:20 CEST 2015

On 21.09.2015 18:20, Alexander Belopolsky wrote:
> 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.

Ah, the joys of freedom of choice :-)

>> 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.

Time on ships seems to depend on what the captain and company
think is the right way:


even though there is a standard called "Nautical time" for this:


In practice, nautical times are used only for radio communication, etc. Aboard the ship, e.g. for
scheduling work and meal times, the ship may use a suitable time of its own choosing. The captain is
permitted to change his or her clocks at a chosen time following the ship's entry into another time
zone, typically at midnight. Ships on long-distance passages change time zone on board in this
fashion. On short passages the captain may not adjust clocks at all, even if they pass through
different time zones, for example between the UK and continental Europe. Passenger ships often use
both nautical and on-board time zones on signs. When referring to time tables and when communicating
with land, the land time zone must be employed.

On planes, the situation seems to be similar. I've not been on a flight
yet where the captain announces new time zones midway :-)

I guess even though the approach to use location names for time zones
creates a more or less sane system on the ground, it doesn't really
address the changes in authority when things start moving.

Perhaps we should just standardize on UTC world-wide and then
instead have the work day begin at different times depending
on location. Crazy idea, but then it'd safe us all a lot of
work :-)

Marc-Andre Lemburg

Professional Python Services directly from the Experts (#1, Sep 22 2015)
>>> Python Projects, Coaching and Consulting ...  http://www.egenix.com/
>>> Python Database Interfaces ...           http://products.egenix.com/
>>> Plone/Zope Database Interfaces ...           http://zope.egenix.com/
2015-09-14: Released mxODBC Plone/Zope DA 2.2.3   http://egenix.com/go84
2015-09-26: Python Meeting Duesseldorf Sprint 2015          4 days to go
2015-10-21: Python Meeting Duesseldorf ...                 29 days to go

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611

More information about the Datetime-SIG mailing list