[issue31644] bug in datetime.datetime.timestamp

2017-09-29 Thread Kadir Liano
New submission from Kadir Liano : datetime.datetime(2014,3,9,2).timestamp() returns 1394352000.0 datetime.datetime(2014,3,9,3).timestamp() returns 1394352000.0 -- components: Library (Lib) messages: 303362 nosy: kliano priority: normal severity: normal status: open title: bug in

[issue31646] bug in time.mktime

2017-09-29 Thread Kadir Liano
New submission from Kadir Liano : import time fmt = '%d-%b-%y %H:%M:%S' print(time.mktime(time.strptime('09-Mar-14 02:00:00',fmt))) 1394348400.0 in Windows 7, Python 2.7 and 3.6 1394352000.0 in LinuxMint LMDE 2, Python 3.6 -- components: Library (Lib) messages:

[issue31644] bug in datetime.datetime.timestamp

2017-09-29 Thread Kadir Liano
Kadir Liano added the comment: The datetime object returned by strptime() does not have tzinfo. Whatever default timezone that was chosen should produce consistent timestamp. Reading a sequential datetime string and converting it to a sequence of timestamp results in expected time folding

[issue31646] bug in time.mktime

2017-09-29 Thread Kadir Liano
Kadir Liano added the comment: time.mktime(time.strptime('09-Mar-14 01:00:00',fmt)) time.mktime(time.strptime('09-Mar-14 02:00:00',fmt)) Both statements produce 1394348400.0 in Win7. The answers are 1394348400.0 and 1394352000.0 in Linux which is