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,13 +169,15 @@ export class TrytonJSONEncoder {
case "datetime": {
const dt = specialValue as TrytonDateTime;
return new Date(
dt.year,
dt.month - 1,
dt.day,
dt.hour || 0,
dt.minute || 0,
dt.second || 0,
Math.floor((dt.microsecond || 0) / 1000)
Date.UTC(
dt.year,
dt.month - 1,
dt.day,
dt.hour || 0,
dt.minute || 0,
dt.second || 0,
Math.floor((dt.microsecond || 0) / 1000)
)
);
}