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 06:53:55 EDT 2021


On 2021-08-31 02:16, dn via Python-list wrote:
> On 31/08/2021 11.07, Dennis Lee Bieber wrote:
>> On Sun, 29 Aug 2021 19:49:19 -0700 (PDT), "hongy... at gmail.com"
>> <hongyi.zhao at gmail.com> declaimed the following:
> ...
> 
>> 	Might have helped to mention you were in China... To me, CST is North
>> America Central Standard Time (and I'd have expected this time of year to
>> see CDT - Central Daylight Time)... That led me on a weird meaningless side
>> track...
> ...
> 
>> 	I'm in EDT (Eastern Daylight Time) -- so 4 hours behind UTC.
> 
> 
> Which is correct?
> 
> CST in China
> https://www.timeanddate.com/time/zones/cst-china
> 
> CST in North America
> https://www.timeanddate.com/time/zones/cst
> 
> and not to mention Cuba
> https://www.timeanddate.com/time/zones/
> 
[snip]
What annoys me is when someone starts that a webinar will start at, say, 
xx ET. I have to know which country that person is in and whether 
daylight savings is currently in effect (EST or EDT?) so that I can 
convert to my local time.

It's so much easier to use UTC.

I know what timezone I'm in and whether daylight savings is currently in 
effect here, so I know the local offset from UTC.


More information about the Python-list mailing list