Commit 0436752
authored
Fix DateTime with ZoneId unpacking (#1098)
The timezone offset was miss-calculated because of an error on extracting timezone information when the hour equals to `0`.
The problems happens because `Intl.DateTimeFormat` when configured with `hour12: false` returns `0` hour as `24`.
The solution for this is convert `24` to `0` before calculate the `offset`.
NOTE:
Other valid solution would be change `hourCycle` to `h23`.
However, this solution is not supported by all javascript environment.1 parent 6fb7fff commit 0436752
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| 282 | + | |
| 283 | + | |
282 | 284 | | |
283 | 285 | | |
284 | 286 | | |
| |||
0 commit comments