Timothy Flynn
6efbafa6e0
Everywhere: Update copyrights with my new serenityos.org e-mail :^)
2022-01-31 18:23:22 +00:00
Timothy Flynn
1f051a8e25
LibTimeZone: Handle time zones which begin the year in daylight savings
2022-01-25 18:39:36 +00:00
Timothy Flynn
7103012c7d
LibTimeZone: Add an API to retrieve both daylight and standard offsets
...
This API will also include the formatted name of the time zone, with
respect for DST (e.g. EST vs EDT for America/New_York).
2022-01-25 18:39:36 +00:00
Timothy Flynn
70f49d0696
LibJS+LibTimeZone+LibUnicode: Indicate whether a time zone is in DST
...
Return whether the time zone is in DST during the provided time from
TimeZone::get_time_zone_offset,
2022-01-19 21:20:41 +00:00
Timothy Flynn
42c9c57141
LibJS+LibTimeZone: Begin handling DST when computing time zone offsets
...
This also updates some expectations in a Temporal time zone offset test
that is using a time stamp which is in DST for a few time zones.
2022-01-19 21:20:41 +00:00
Linus Groh
205d63c3f0
LibTimeZone: Operate in UTC-only mode when !ENABLE_TIME_ZONE_DATA
...
Instead of only having dummy functions that don't work with any input,
let's at least support one time zone: 'UTC'. This matches the basic
Temporal implementation for engines without ECMA-262, for example.
2022-01-11 22:17:39 +01:00
Timothy Flynn
09c0324880
LibTimeZone: Begin generating GMT offset rules for each time zone
...
This is a rather naive implementation, but serves as a first pass at
determining the GMT offset for a time zone at a particular point in
time. This implementation ignores DST (because we are not parsing any
RULE entries yet), and ignores any offset patterns of the form "Mon>4"
or "lastSun".
2022-01-11 00:36:45 +01:00
Timothy Flynn
e9c42d0bc5
LibTimeZone: Add methods to canonicalize a time zone name
2022-01-11 00:36:45 +01:00
Timothy Flynn
1c2c98ac5d
LibTimeZone: Add method to convert a time zone to a string
2022-01-11 00:36:45 +01:00
Timothy Flynn
14535fb67a
LibTimeZone: Perform time-zone-from-string lookups case insensitively
...
Time zone names in the TZDB are defined to be case insensitive.
2022-01-11 00:36:45 +01:00
Timothy Flynn
b493c2ca90
LibTimeZone: Add a unit test for generated time zone data
2022-01-11 00:36:45 +01:00