Try fix error with time zone

This commit is contained in:
2025-11-19 12:09:00 -05:00
parent f2e56c99aa
commit 97cb5078e2

View File

@@ -169,6 +169,7 @@ export class TrytonJSONEncoder {
case "datetime": { case "datetime": {
const dt = specialValue as TrytonDateTime; const dt = specialValue as TrytonDateTime;
return new Date( return new Date(
Date.UTC(
dt.year, dt.year,
dt.month - 1, dt.month - 1,
dt.day, dt.day,
@@ -176,6 +177,7 @@ export class TrytonJSONEncoder {
dt.minute || 0, dt.minute || 0,
dt.second || 0, dt.second || 0,
Math.floor((dt.microsecond || 0) / 1000) Math.floor((dt.microsecond || 0) / 1000)
)
); );
} }