From efdb13f0c75cbfce5d6f7be6c05ddcac025d5dff Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Wed, 18 Mar 2020 19:50:26 +0100 Subject: [PATCH] os/date: allow negative timestamps. Why not? Even on 32-bit time_t systems this lasts until late 1901. --- src/core/os.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/core/os.c b/src/core/os.c index 2451b3ed..f12c8bfd 100644 --- a/src/core/os.c +++ b/src/core/os.c @@ -621,8 +621,6 @@ static Janet os_date(int32_t argc, Janet *argv) { struct tm *t_info = NULL; if (argc) { int64_t integer = janet_getinteger64(argv, 0); - if (integer < 0) - janet_panicf("expected non-negative 64 bit signed integer, got %v", argv[0]); t = (time_t) integer; } else { time(&t);