0

I have pendulum parsed a date string:

pendulum.parse('2015-03-09')

This object is now stored to a SqlAlchemy database table (mysql) with Column(SqlAlchemy.DateTime)

Now, I load this column value, its then:

enter image description here

Now I want to compare it back with the string date ... like this:

created.timestamp() == pendulum.parse('2015-03-09').timestamp()

which results in False ... WHAT!?

created.timestamp() -> 1425855600.0
pendulum.parse('2015-03-09').timestamp() -> 1425859200.0

Here is the pendulum parsed object FYI:

enter image description here

So why are the timestamps different?

Martin Fischer
  • 469
  • 1
  • 7
  • 21

0 Answers0