You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repo and believe that this is not a duplicate.
OS version and name: MacOS Sonoma 14.5
Pendulum version: 3.0.0
Issue
There's a problem when comparing dates which are in the same timezone, but have different offsets due to daylight savings in the fold. Basically, daylight savings are not taken into account in the fold.
In the following example, d1 is after the fold, meaning it was 2:15 AM and was moved back to 1:15 AM, which should be after 1:25 AM before the fold.
However, simply comparing d1 to d2 with d1 < d2 returns True, whereas d1.timestamp() < d2.timestamp() returns the correct result, False.
Issue
There's a problem when comparing dates which are in the same timezone, but have different offsets due to daylight savings in the fold. Basically, daylight savings are not taken into account in the fold.
In the following example, d1 is after the fold, meaning it was 2:15 AM and was moved back to 1:15 AM, which should be after 1:25 AM before the fold.
However, simply comparing d1 to d2 with
d1 < d2
returnsTrue
, whereasd1.timestamp() < d2.timestamp()
returns the correct result,False
.Example:
The text was updated successfully, but these errors were encountered: