Open sushinoya opened 1 year ago
Although an edge case, this is quite critical because I believe that .replace should ideally not be altering any other fields of the DateTime except the one it's "replacing".
This time doesn't exist because it's skipped during the switch from EST to EDT, so it's a little more than an edge case. I think one could argue that pendulum should error here, but...
@sdispater Do you have an opinion on the matter? Potentially erroring might also be better than silently shifting to the next valid time.
Issue
When replacing the timezone of a naive DateTime, the time component changes in this particular case -
If we do the same using
datetime
andpytz
, we get 1.30 as we expect -Although an edge case, this is quite critical because I believe that
.replace
should ideally not be altering any other fields of theDateTime
except the one it's "replacing".