[issue22752] incorrect time.timezone value

2015-03-01 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue22752] incorrect time.timezone value

2014-11-24 Thread Akira Li
Akira Li added the comment: C standard delegates to implementations: The local time zone and Daylight Saving Time are implementation-defined. gcc (one of the implementations) says [1]: [timezone] contains the difference between UTC and the latest local standard time, in seconds west of UT

[issue22752] incorrect time.timezone value

2014-11-24 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > Is it possible to set timezone based on localtime(current_time) where > current_time is the result of time() call? No. time.timezone is a constant it cannot change with time. This is a limitation of the POSIX and C standards on which time module is ba

[issue22752] incorrect time.timezone value

2014-11-24 Thread Dmitry Shachnev
Dmitry Shachnev added the comment: Is it possible to set timezone based on localtime(current_time) where current_time is the result of time() call? This bug is not just about returning the wrong timezone. Because of it, the full time string produced with Python may be wrong. For example, my ma

[issue22752] incorrect time.timezone value

2014-10-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The time module cannot handle historical changes in timezone info. Try using datetime.datetime.astimezone() method (with no arguments) or a 3rd party timezone support library. https://docs.python.org/3/library/datetime.html#datetime.datetime.astimezone

[issue22752] incorrect time.timezone value

2014-10-28 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue22752] incorrect time.timezone value

2014-10-28 Thread matrokhin oleg
matrokhin oleg added the comment: $ date -R Tue, 28 Oct 2014 17:27:54 +0300 $ python -c "import time; print time.timezone" -14400 -- ___ Python tracker ___ _

[issue22752] incorrect time.timezone value

2014-10-28 Thread matrokhin oleg
New submission from matrokhin oleg: There was timezone change in Russia at 26 october (http://www.timeanddate.com/time/change/russia/moscow) But code in timemodule.c using first day of the year to get timezone t = (time((time_t *)0) / YEAR) * YEAR; p = localtime(&t); j