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

MRAB python at mrabarnett.plus.com
Tue Aug 31 18:18:02 EDT 2021


On 2021-08-31 22:53, 2QdxY4RzWzUUiLuE at potatochowder.com wrote:
> On 2021-09-01 at 07:32:43 +1000,
> Chris Angelico <rosuav at gmail.com> wrote:
> 
>> On Wed, Sep 1, 2021 at 7:17 AM <2QdxY4RzWzUUiLuE at potatochowder.com> wrote:
> 
>> > What about Phoenix?  In the winter, it's the same time there as it is in
>> > San Francisco, but in the summer, it's the same time there as it is in
>> > Denver (Phoenix doesn't observe Daylight Saving Time).
>> 
>> I prefer to say: In winter, San Francisco (or Los Angeles) is the same
>> as Phoenix, but in summer, Los Angeles changes its clocks away, and
>> Denver changes to happen to be the same as Phoenix.
> 
> Not exactly.  Sort of.  Phoenix and Denver are both in America/Denver
> (aka US/Mountain), but only Denver observes DST.  San Francisco and Los
> Angeles are both in America/Los_Angeles, and both observe DST.
> 
>> At least the US has governed DST transitions. As I understand it, any
>> given city has to follow one of the standard time zones, and may
>> EITHER have no summer time, OR transition at precisely 2AM/3AM local
>> time on the federally-specified dates. (I think the EU has also
>> mandated something similar for member states.)
> 
> That's my understanding, too.
> 
[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.


More information about the Python-list mailing list