From 17c9379c159c4e366ca5edef85fe0ec258af369d Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 15 Jul 2024 23:39:00 +0300 Subject: [PATCH] fix dynamic logic date time zone --- client/src/date-time.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/date-time.js b/client/src/date-time.js index fc17554480..9303655ad5 100644 --- a/client/src/date-time.js +++ b/client/src/date-time.js @@ -263,20 +263,22 @@ class DateTime { } /** - * Convert a date to a moment. + * Convert a system-formatted date to a moment. * * @param {string} string A date value in a system representation. * @returns {moment.Moment} + * @internal */ toMomentDate(string) { - return moment.utc(string, this.internalDateFormat); + return moment.tz(string, this.internalDateFormat, this.timeZone); } /** - * Convert a date-time to a moment. + * Convert a system-formatted date-time to a moment. * * @param {string} string A date-time value in a system representation. * @returns {moment.Moment} + * @internal */ toMoment(string) { let m = moment.utc(string, this.internalDateTimeFullFormat);