cripslock

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 69c31d72bcb621cfc7090e985dbc39af8dffdf1c
parent 24b6df8c2642eea909795b8ed6eb8a4671901a14
Author: Daniel Barlow <dan@telent.net>
Date:   Tue, 15 Sep 2026 21:41:18 +0100

ISO dates may have a space before the final Z

Diffstat:
Mlib.fnl | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib.fnl b/lib.fnl @@ -71,7 +71,7 @@ (fn parse-iso-timestamp [date-str] (let [(s _ year month day hour min sec frac) - (string.find date-str "(%d+)%-(%d+)%-(%d+)T(%d+):(%d+):(%d+)%.(%d+)Z")] + (string.find date-str "(%d+)%-(%d+)%-(%d+)T(%d+):(%d+):(%d+)%.(%d+) -Z")] (and s (os.time { : year @@ -100,6 +100,8 @@ (expect= (parse-timestamp "2024-05-08T12:46:56.865432Z") 1715172416) + (expect= (parse-timestamp "2023-10-03 19:10:23.000000000 Z") 1715172416) + )