Revise implementation of jerry_port_get_local_time_zone_adjustment on Win32 (#4589)

Handle the limitation of Win32 date API properly.

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
This commit is contained in:
Yonggang Luo
2024-11-14 20:38:46 +08:00
committed by GitHub
parent 43f5026eb2
commit d2e0d71101
2 changed files with 32 additions and 2 deletions
+1
View File
@@ -97,6 +97,7 @@ assert (isNaN (d.getTimezoneOffset()));
/* 5. test case */
assert (new Date(2013, -1).getMonth() === 11);
assert (new Date(-2, -2).getFullYear() === -3);
assert (new Date(30888, 2).getFullYear() === 30888);
assert (new Date(-1, -1).getFullYear() === -2);
assert (new Date(-1, -1, -1).getMonth() === 10);
assert (new Date(-1, -1, -1, -1).getDate() === 28);