The sqlite3 timestamp conversion between unixepoch and localtime can't be done according to the timezone setting on the machine automatically.

Chris Angelico rosuav at gmail.com
Thu Sep 2 15:11:16 EDT 2021


On Fri, Sep 3, 2021 at 4:40 AM Alan Gauld via Python-list
<python-list at python.org> wrote:
>
> On 31/08/2021 23:31, Chris Angelico wrote:
>
> > Ah, good to know. I think that actually makes a lot of sense; in the
> > US, they try to let everyone pretend that the rest of the world
> > doesn't exist ("we always change at 2AM"), but in Europe, they try to
> > synchronize for the convenience of commerce ("everyone changes at 1AM
> > UTC").
>
> There's another gotcha with DST changes. The EU and USA have different
> dates on which they change to DST.
>
> In one of them (I can't recall which is which) they change on the 4th
> weekend of October/March in the other they change on the last weekend.
>
> That means on some years (when there are 5 weekends) there is a
> week when one has changed and the other hasn't. That caused us
> a lot of head scratching the first time we encountered it because
> our service centres in the US and EU were getting inconsistent
> time reporting and some updates showing as having happened in
> the future!
>

I live in Australia. You folks all change in *the wrong direction*.
Twice a year, there's a roughly two-month period that I call "DST
season", when different countries (or groups of countries) switch DST.
It is a nightmare to schedule anything during that time.

The ONLY way is to let the computer handle it. Don't try to predict
ANYTHING about DST manually.

ChrisA


More information about the Python-list mailing list