mirror of
https://github.com/janet-lang/janet
synced 2025-10-17 08:47:39 +00:00
os/date: check the second argument truthy, not the third.
This commit is contained in:
@@ -627,7 +627,7 @@ static Janet os_date(int32_t argc, Janet *argv) {
|
|||||||
} else {
|
} else {
|
||||||
time(&t);
|
time(&t);
|
||||||
}
|
}
|
||||||
if (argc >= 2 && janet_truthy(argv[2])) {
|
if (argc >= 2 && janet_truthy(argv[1])) {
|
||||||
/* local time */
|
/* local time */
|
||||||
#ifdef JANET_WINDOWS
|
#ifdef JANET_WINDOWS
|
||||||
localtime_s(&t_infos, &t);
|
localtime_s(&t_infos, &t);
|
||||||
|
Reference in New Issue
Block a user