mirror of https://github.com/janet-lang/janet
Use _tzset() on windows before localtime_s
This commit is contained in:
parent
a6f93efd39
commit
e316ccb1e0
|
@ -1345,6 +1345,7 @@ JANET_CORE_FN(os_date,
|
||||||
if (argc >= 2 && janet_truthy(argv[1])) {
|
if (argc >= 2 && janet_truthy(argv[1])) {
|
||||||
/* local time */
|
/* local time */
|
||||||
#ifdef JANET_WINDOWS
|
#ifdef JANET_WINDOWS
|
||||||
|
_tzset();
|
||||||
localtime_s(&t_infos, &t);
|
localtime_s(&t_infos, &t);
|
||||||
t_info = &t_infos;
|
t_info = &t_infos;
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue