This makes SQLite unusable for such a use case
I propose to introduce a compile time option so that the actual time zone 
settings are always respected.


-----Urspr?ngliche Nachricht-----
Von: sqlite-users-bounces at mailinglists.sqlite.org 
[mailto:sqlite-users-bounces at mailinglists.sqlite.org] Im Auftrag von Hick 
Gunter
Gesendet: Donnerstag, 23. Juli 2015 10:43
An: 'General Discussion of SQLite Database'
Betreff: Re: [sqlite] changed time zone

AFAICT the windows implementation of localtime() will honour the settings of 
the environment variables TZ, _timezone, _daylight and _tzname. The environment 
variables of a process are set (copied from the parent process) on process 
creation. Subsequent changes in the parent process are NOT reflected in the 
child process.

The localtime() will check the date/time setting in the control panel only if 
the TZ environment variable is NOT set. I was unable to determine if this 
lookup is performed once on the first call and then cached (likely) or on each 
call.



-----Urspr?ngliche Nachricht-----
Von: Bruno Schw?gli (CTModule AG) [mailto:bruno.schwaegli at ctmodule.com]
Gesendet: Donnerstag, 23. Juli 2015 10:12
An: 'sqlite-users at mailinglists.sqlite.org'
Betreff: [sqlite] changed time zone

Hello

We use SQLite in an environment (ships) where a time zone change can happen 
during normal operation. We then set the time zone of the system (windows) 
accordingly.
Running SQLite instances do not respect this change. So Time('now') and  
Time('now', 'localtime') still return the same values but in my opinion 
Time('now', 'localtime') should respect the new time zone.

Steps to reproduce:
select Time('now'), Time('now', 'localtime') then change the time zone in the 
os (windows) to some other value and do again the above select in the same 
still running instance

Test environment:
SQLite Version 3.8.10.2
OS: Windows 7

Thanks and best regards
Bruno Schw?gli


PS. Tried to report this bug to sqlite-users at sqlite.org<mailto:sqlite-users 
at sqlite.org> but message was automatically rejected 
_______________________________________________
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___________________________________________
 Gunter Hick
Software Engineer
Scientific Games International GmbH
FN 157284 a, HG Wien
Klitschgasse 2-4, A-1130 Vienna, Austria
Tel: +43 1 80100 0
E-Mail: hick at scigames.at

This communication (including any attachments) is intended for the use of the 
intended recipient(s) only and may contain information that is confidential, 
privileged or legally protected. Any unauthorized use or dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the sender by return e-mail message and 
delete all copies of the original communication. Thank you for your cooperation.


_______________________________________________
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to