Repository navigation
Commit 7bcb802
fix(time): reject a nonexistent local time in convert_time
convert_time built the source datetime with fold=0, so a wall-clock
time skipped by a spring-forward transition (02:30 on 2024-03-10 in
America/New_York) was converted with the pre-transition offset and
reported as if it had happened. It now round-trips the source time
through a timestamp and raises an error when the wall-clock time does
not survive, naming the time, the zone and the date it was checked on.
The pinning test now asserts the error, and its KNOWN BUG #5002 marker
is gone.
Closes #5002
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: cliffhall <cliff@futurescale.com>1 parent 571e2b3 commit 7bcb802
2 files changed
Lines changed: 17 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
105 | 115 | | |
106 | 116 | | |
107 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
709 | 709 | | |
710 | 710 | | |
711 | 711 | | |
712 | | - | |
713 | 712 | | |
714 | 713 | | |
715 | | - | |
716 | | - | |
| 714 | + | |
| 715 | + | |
717 | 716 | | |
718 | 717 | | |
719 | | - | |
| 718 | + | |
720 | 719 | | |
721 | 720 | | |
722 | 721 | | |
| |||
725 | 724 | | |
726 | 725 | | |
727 | 726 | | |
728 | | - | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | | - | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
743 | 731 | | |
744 | 732 | | |
745 | 733 | | |
| |||
0 commit comments