os/date: check the second argument truthy, not the third.

This commit is contained in:
Leah Neukirchen 2020-03-18 19:49:23 +01:00
parent b0d8369534
commit f013c6e48d
1 changed files with 1 additions and 1 deletions

View File

@ -627,7 +627,7 @@ static Janet os_date(int32_t argc, Janet *argv) {
} else {
time(&t);
}
if (argc >= 2 && janet_truthy(argv[2])) {
if (argc >= 2 && janet_truthy(argv[1])) {
/* local time */
#ifdef JANET_WINDOWS
localtime_s(&t_infos, &t);