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

dn PythonList at DancesWithMice.info
Tue Aug 31 20:07:20 EDT 2021


On 01/09/2021 11.27, MRAB wrote:
> On 2021-08-31 23:31, Chris Angelico wrote:
>> On Wed, Sep 1, 2021 at 8:22 AM MRAB <python at mrabarnett.plus.com> wrote:
>>>
>>> [snip]
>>> In the EU, DST in the member states changes at the same time. It's not
>>> like the US where it ripples across the timezones, so the differences
>>> vary during the change. It all happens in one go.
>>>
>>
>> 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").
>>
>> A quick browse of Wikipedia suggests that some European countries
>> (outside of the EU, which mandates DST transitions) have constant
>> year-round UTC offsets. In theory, there could be a non-EU country
>> that observes DST with different dates, but I can't find any examples.
>> Here's hoping, hehe.
>>
> It goes forwards on the last Sunday of March and back on the last Sunday
> of October.

and @Chris' point about the lack of synchronisation:

«
Daylight saving starts each year at 2am on the last Sunday in September,
and ends at 3am on the first Sunday in April.

Daylight saving starts 	Daylight saving ends
26 September 2021 	3 April 2022
»
https://www.govt.nz/browse/recreation-and-the-environment/daylight-saving/


Have learned something new about my adopted-country today! Apparently
New Zealand was once one of those half-hour-out countries (until 1946).
>From when no "Daylight Saving time" was recognised. In 1974 a trial took
place, and after public debate, the idea extended - continuing today:
https://www.govt.nz/browse/recreation-and-the-environment/daylight-saving/history-of-daylight-saving-in-nz/


To explain the rationale for "Daylight Saving", ie "Summer Time":
«
The 2008 survey found that 82% of New Zealanders approved of the 2007
extension to the period of daylight saving time.

The rationale for changing the time over the summer months is that more
sunlight hours will fall in the early morning if standard time is
applied year round. In summer, these early morning sunlight hours are
seen as being wasted as many people are asleep at that time. If the
sunlight hours are shifted to the evening, by way of daylight saving
time, they are more useful.
»
-- 
Regards,
=dn


More information about the Python-list mailing list