diff --git a/src/jsonrpc.ts b/src/jsonrpc.ts index f5e9a5c..a07b942 100644 --- a/src/jsonrpc.ts +++ b/src/jsonrpc.ts @@ -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) + ) ); }