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.
Eric V. Smith added the comment:
This is a daylight savings time folding problem. Without a timezone, those are
in fact the same point in time, at least in my timezone (US Eastern).
If you specify a timezone, you'll see the difference:
datetime.datetime(2014,3,9,2,tzinfo=datetime.timezone(dat
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 datetime