From 97cb5078e2e372e053ccab7cb8a695c4457f767a Mon Sep 17 00:00:00 2001 From: Juan Diego Moreno Upegui Date: Wed, 19 Nov 2025 12:09:00 -0500 Subject: [PATCH] Try fix error with time zone --- src/jsonrpc.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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) + ) ); }