aboutsummaryrefslogtreecommitdiff
path: root/test/02-api.janet
diff options
context:
space:
mode:
Diffstat (limited to 'test/02-api.janet')
-rw-r--r--test/02-api.janet8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/02-api.janet b/test/02-api.janet
index eb0666f..2a9c0ec 100644
--- a/test/02-api.janet
+++ b/test/02-api.janet
@@ -19,3 +19,11 @@
(assert (date/format now :default true))
# format string
(assert (date/format now :%c))
+
+# ensure tm + gmtime are spec-compliant
+(def u (date/utc {:year 1970}))
+(def l (date/local {:year 1970}))
+(assert (= u
+ (:gmtime (:timegm u))))
+(assert (= l
+ (:localtime (:mktime l))))