Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue5582] Incorrect DST transition

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Oct 29, 2009, 10:08 AM

Post #1 of 3 (67 views)
Permalink
[issue5582] Incorrect DST transition

acummings <acummings[at]aperiogroup.com> added the comment:

The same thing happens with the autumn transition. Windows knows the
transition has changed, but python does not seem to know that:

The following interactive session was run on Oct 29th, at 10:02 (Windows
clock reported 10:02):

>>> july1 = datetime(2009, 7, 1)
>>> jan1 = datetime(2009, 1,1)
>>> oct30 = datetime(2009, 10, 30)
>>> time.localtime(time.mktime(july1.timetuple()))
(2009, 7, 1, 0, 0, 0, 2, 182, 1)
>>> time.localtime(time.mktime(jan1.timetuple()))
(2009, 1, 1, 0, 0, 0, 3, 1, 0)
>>> time.localtime(time.mktime(oct30.timetuple()))
(2009, 10, 30, 0, 0, 0, 4, 303, 0)
>>> time.localtime(time.mktime(datetime.now().timetuple()))
(2009, 10, 29, 9, 2, 38, 3, 302, 0)

Again, the 9th element of the timetuple is 1 for July 1st, 0 for Jan
1st, and **0** for Oct 30th and Oct 29th. Also, the time reported by
datetime.now() was 9:02, one hour behind.

----------
title: Incorrect DST transition on Windows -> Incorrect DST transition

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue5582>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Oct 29, 2009, 5:05 PM

Post #2 of 3 (59 views)
Permalink
[issue5582] Incorrect DST transition [In reply to]

Antoine Pitrou <pitrou[at]free.fr> added the comment:

Could you try to confirm with at least Python 2.6? We don't do any bug
fixes on 2.5 anymore.

----------
components: +Library (Lib)
nosy: +pitrou, tim_one
priority: -> normal
stage: -> needs patch
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.5

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue5582>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Oct 30, 2009, 8:37 AM

Post #3 of 3 (53 views)
Permalink
[issue5582] Incorrect DST transition [In reply to]

acummings <acummings[at]aperiogroup.com> added the comment:

OK, it works correctly on 2.6.4:

>>> time.localtime(time.mktime(datetime(2009, 10, 30).timetuple()))
time.struct_time(tm_year=2009, tm_mon=10, tm_mday=30, tm_hour=0, tm_min=0,
tm_sec=0, tm_wday=4, tm_yday=303, tm_isdst=1)

I'll close it. Thanks!

----------
status: open -> closed

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue5582>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.