diff options
| -rw-r--r-- | distamp.ha | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -76,7 +76,10 @@ fn printdistamp(i: i64) void = { }; fn abs(s: str) (i64 | date::error) = { - let d = date::from_str("%Y-%m-%d %H:%M:%S", s, chrono::LOCAL)?; + // for some reason locality needs to be specified twice (hare stdlib bug?) + const stz = strings::concat(s, " Europe/Paris"); + defer free(stz); + let d = date::from_str("%Y-%m-%d %T %L", stz, chrono::tz("Europe/Paris")!)?; return time::unix(*(&d: *time::instant)); }; |
