-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normative: Limit day length calculations to safe integers
Carefully crafted custom time zones can cause NormalizedTimeDurationToDays to calculate a day length that is arbitrarily long. In order for implementations not to have to use a normalized time duration or bigint to represent the day length in nanoseconds, limit it to less than 2⁵³ ns. This way, it can be stored in a 64-bit float. This allows time zones to specify day lengths of up to ~104.25 real 24-hour days, which should be more than enough.
- Loading branch information
Showing
2 changed files
with
16 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters