diff options
| author | Julian Hurst <ark@mansus.space> | 2025-10-10 19:36:27 +0200 |
|---|---|---|
| committer | Julian Hurst <ark@mansus.space> | 2025-10-10 19:36:27 +0200 |
| commit | b230946668e575f6290cf3f29afce63f8734402a (patch) | |
| tree | 7b61920c9e7f20d09e84b7f7d4e9a8a2c2c9e4bf /config.ha | |
| parent | 682c89e3f623034f4afda70c1e748198c03c7ea3 (diff) | |
| download | distamp-hareversionbump.tar.gz | |
Changes for new hare version (0.25.2)hareversionbump
Diffstat (limited to 'config.ha')
| -rw-r--r-- | config.ha | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -1,3 +1,4 @@ +use time::date; use fmt; use dirs; use format::ini; @@ -10,12 +11,12 @@ use errors; use strings; type config = struct { - tz: chrono::locality, + tz: date::locality, }; type noexist = !str; -type conferror = !(path::error | noexist | fs::error | chrono::tzdberror); +type conferror = !(path::error | noexist | fs::error | date::tzdberror | nomem); fn loadconfig() (config | conferror) = { const confdir = dirs::config("distamp"); @@ -25,7 +26,7 @@ fn loadconfig() (config | conferror) = { case let e: errors::noentry => fmt::errorln("warn: No config file found")!; return config { - tz = chrono::LOCAL, + tz = date::LOCAL, }; case let e: fs::error => return e; @@ -35,12 +36,12 @@ fn loadconfig() (config | conferror) = { defer io::close(f)!; const sc = ini::scan(f); - let tz: chrono::locality = chrono::LOCAL; + let tz: date::locality= date::LOCAL; for (const e => ini::next(&sc)!) { const key = strings::trim(e.1); const val = strings::trim(e.2); if (key == "tz") { - tz = chrono::tz(val)?; + tz = date::tzdb(val)?; }; }; return config { @@ -54,7 +55,7 @@ fn strconferror(e: conferror) str = { return path::strerror(e); case let e: fs::error => return fs::strerror(e); - case let e: chrono::tzdberror => - return chrono::strerror(e); + case let e: date::tzdberror=> + return date::strerror(e); }; }; |
