hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 71fe2b232ae8773e755c36a60fc0e386c0acb390
parent c7760b1fa39f2a031958d246c4200812bb5c015a
Author: Alexey Yerin <yyp@disroot.org>
Date:   Fri, 27 Oct 2023 20:43:29 +0300

time::chrono: correct leap-seconds.list on FreeBSD

Signed-off-by: Alexey Yerin <yyp@disroot.org>

Diffstat:
Mtime/chrono/+freebsd.ha | 4++++
Mtime/chrono/+linux.ha | 4++++
Mtime/chrono/leapsec.ha | 4----
3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/time/chrono/+freebsd.ha b/time/chrono/+freebsd.ha @@ -3,3 +3,7 @@ def LOCALTIME_PATH: str = "/etc/localtime"; def ZONEINFO_PREFIX: str = "/usr/share/zoneinfo/"; + +// The filepath of the system's "leap-seconds.list" file, which contains UTC/TAI +// leap second data. +export def UTC_LEAPSECS_FILE: str = "/var/db/ntpd.leap-seconds.list"; diff --git a/time/chrono/+linux.ha b/time/chrono/+linux.ha @@ -3,3 +3,7 @@ def LOCALTIME_PATH: str = "/etc/localtime"; def ZONEINFO_PREFIX: str = "/usr/share/zoneinfo/"; + +// The filepath of the system's "leap-seconds.list" file, which contains UTC/TAI +// leap second data. +export def UTC_LEAPSECS_FILE: str = "/usr/share/zoneinfo/leap-seconds.list"; diff --git a/time/chrono/leapsec.ha b/time/chrono/leapsec.ha @@ -37,10 +37,6 @@ type utciniterror = !(fs::error | io::error | encoding::utf8::invalid); // accurate enough to account for small changes in time. export def SECS_1900_1970: i64 = 2208988800; -// The filepath of the system's "leap-seconds.list" file, which contains UTC/TAI -// leap second data. -export def UTC_LEAPSECS_FILE: str = "/usr/share/zoneinfo/leap-seconds.list"; - // UTC/TAI leap second data; UTC timestamps and their offsets from TAI. // Sourced from [[UTC_LEAPSECS_FILE]]. let utc_leapsecs: [](i64, i64) = [];