You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happens both when building (and testing) in MSYS2 (mingw), and when cross-building using debian's mingw (and testing on windows) as described at #324 .
In GMT+2 zone on Windows, at the REPL:
> Date()
"Mon Nov 21 2022 07:56:51 GMT+0000"
While on linux with the same timezone, this prints:
> Date()
"Mon Nov 21 2022 10:00:12 GMT+0200"
I think this also causes a test failure at tests/test-ffi.js. I modified the ffi test like so (after it failed the hour and dst comparisons):
diff --git a/tests/test-ffi.js b/tests/test-ffi.js
index 6899dd9..2ce94e4 100644
--- a/tests/test-ffi.js+++ b/tests/test-ffi.js@@ -137,6 +137,7 @@ const FFI = tjs.ffi;
assert.eq(tm.year, 122); // years since 1900
assert.eq(tm.mon, 6); // month since January, 0-11
const cmpDate = new Date(testTimestamp*1000);
+ throw(Error(["ffi time:", JSON.stringify(tm), "js time:", cmpDate]));
assert.eq(tm.mday, cmpDate.getDate()); // day of the month, 1-31
assert.eq(tm.hour, cmpDate.getHours()); // hours since midnight, 0-23
assert.eq(tm.min, cmpDate.getMinutes()); // minutes after the hour, 0-59
This happens both when building (and testing) in MSYS2 (mingw), and when cross-building using debian's mingw (and testing on windows) as described at #324 .
In GMT+2 zone on Windows, at the REPL:
While on linux with the same timezone, this prints:
I think this also causes a test failure at
tests/test-ffi.js
. I modified the ffi test like so (after it failed the hour and dst comparisons):And it prints (hour +3, dst differ):
I also tried setting
TZ=...
and it did not seem to affect the jsDate()
value, but it did seem to affect the ffi localtime value (hour +1,dst differ):I'm guessing this is a quickjs issue? (but googling did not seem to find it mentioned anywhere).
(edited few times with more accurate info/outputs)
The text was updated successfully, but these errors were encountered: