-
-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
In DateTime 1.50, when using delta_ms and delta_minutes to get the number of minutes between certain sets of times last Friday and this past Monday (on either side of the DST changeover), I ended up with a result that was 1440 minutes (24 hours) larger than expected.
See the attached test cases for two examples that are working:
- Fri 12:30 to Mon 12:30 = 4320 minutes (72 hours)
- Fri 12:30 to Mon 12:40 = 4330 minutes (72 hours plus 10 minutes)
... and one that isn't:
- Fri 12:30 to Mon 12:20 should return 4310 minutes (72 hours minus 10 minutes), but actually returns 5750 minutes (96 hours minus 10 minutes).
I'm not suggesting that it should be 73 hours instead of 72 -- I see that DateTime does some relative math rather than being pedantic, and I'm fine with that, especially when DST is involved. "Off by 24 hours" seems like a bug, though.
Metadata
Metadata
Assignees
Labels
No labels