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