diff options
author | Linus Groh <mail@linusgroh.de> | 2021-11-07 20:06:28 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-11-07 20:06:28 +0000 |
commit | e93ce1ff691678cb07f50170adcc975398cf86ff (patch) | |
tree | 79d6ddfe25e8f05210aa27a902d5dfddfdf590b1 /Userland/Utilities | |
parent | 68d80d239b09db3f4e6d1a2d90e3e9405078b930 (diff) | |
download | serenity-e93ce1ff691678cb07f50170adcc975398cf86ff.zip |
LibJS: Fix nanoseconds formatting in format_time_zone_offset_string()
Two issues:
- The format string said "{:9}", which left-pads with spaces and not
zeros as required
- Even when correcting that, we were not accounting for step 11 b:
"Set fraction to the longest possible substring of fraction starting
at position 0 and not ending with the code unit 0x0030 (DIGIT ZERO)."
We can safely use trim() for that as the formatted string is known to
not contain only zeros (which would leave the left-most in place).
Also adds tests for "UTC" and various numeric offsets.
Diffstat (limited to 'Userland/Utilities')
0 files changed, 0 insertions, 0 deletions