summaryrefslogtreecommitdiff
path: root/Tests/LibTimeZone
AgeCommit message (Collapse)Author
2023-01-19Tests: Add missing library dependency for LibTimeZone testsSam Atkins
2022-10-18LibTimeZone+LibJS: Update to TZDB version 2022eTimothy Flynn
https://mm.icann.org/pipermail/tz-announce/2022-October/000074.html This version changes America/Chicago's transtion from LMT to CST from 1883 Nov 18 12:09:24 to 1883 Nov 18 18:00.
2022-10-17LibTimeZone: Default to UTC if parsing the TZ environment variable failsTimothy Flynn
Commit c3fd455 changed LibTimeZone to fall back to the system time zone when we fail to parse the TZ environment variable. This behavior differs from both our LibC and glibc; they abort parsing and default to UTC. This changes LibTimeZone to behave the same way to avoid a very awkward situation where some parts of the codebase thinks the timezone is UTC, and others think the timezone is whatever /etc/timezone indicates.
2022-09-28LibTimeZone: Use the last DST rule in the TZDB if a match isn't foundTimothy Flynn
Some time zones, like "Asia/Shanghai", use a set of DST rules that end before present day. In these cases, we should fall back to last possible RULE entry from the TZDB. The time zone compiler published by IANA (zic) performs the same fallback starting with version 2 of the time zone file format.
2022-08-25LibTimeZone: Fix tests when ENABLE_TIME_ZONE_DATABASE_DOWNLOAD is OFFTimothy Flynn
2022-01-31Everywhere: Update copyrights with my new serenityos.org e-mail :^)Timothy Flynn
2022-01-25LibTimeZone: Handle time zones which begin the year in daylight savingsTimothy Flynn
2022-01-25LibTimeZone: Add an API to retrieve both daylight and standard offsetsTimothy Flynn
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-23LibJS+LibTimeZone+LibUnicode: Remove direct linkage to LibTimeZoneTimothy Flynn
This is no longer needed now that LibTimeZone is included within LibC. Remove the direct linkage so that others do not mistakenly copy-paste the CMakeLists text elsewhere.
2022-01-19LibJS+LibTimeZone+LibUnicode: Indicate whether a time zone is in DSTTimothy Flynn
Return whether the time zone is in DST during the provided time from TimeZone::get_time_zone_offset,
2022-01-19LibJS+LibTimeZone: Begin handling DST when computing time zone offsetsTimothy Flynn
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-11LibTimeZone: Operate in UTC-only mode when !ENABLE_TIME_ZONE_DATALinus Groh
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-11LibTimeZone: Begin generating GMT offset rules for each time zoneTimothy Flynn
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-11LibTimeZone: Add methods to canonicalize a time zone nameTimothy Flynn
2022-01-11LibTimeZone: Add method to convert a time zone to a stringTimothy Flynn
2022-01-11LibTimeZone: Perform time-zone-from-string lookups case insensitivelyTimothy Flynn
Time zone names in the TZDB are defined to be case insensitive.
2022-01-11LibTimeZone: Add a unit test for generated time zone dataTimothy Flynn