details: https://code.tryton.org/tryton/commit/accaf443e6d0
branch: default
user: Cédric Krier <[email protected]>
date: Fri Oct 30 10:18:56 2026 +0100
description:
Always use moment in UTC for date
Closes #15204
diffstat:
sao/src/pyson.js | 1 -
sao/src/sao.js | 3 +++
2 files changed, 3 insertions(+), 1 deletions(-)
diffs (34 lines):
diff -r f82f561062e6 -r accaf443e6d0 sao/src/pyson.js
--- a/sao/src/pyson.js Thu Oct 29 18:16:51 2026 +0100
+++ b/sao/src/pyson.js Fri Oct 30 10:18:56 2026 +0100
@@ -794,7 +794,6 @@
}
if (!date || !date.isDate) {
date = Sao.Date();
- date.utc(true);
}
if (value.y) date.year(value.y);
if (value.M) date.month(value.M - 1);
diff -r f82f561062e6 -r accaf443e6d0 sao/src/sao.js
--- a/sao/src/sao.js Thu Oct 29 18:16:51 2026 +0100
+++ b/sao/src/sao.js Fri Oct 30 10:18:56 2026 +0100
@@ -253,6 +253,7 @@
date.date(day);
date.set({hour: 0, minute: 0, second: 0, millisecond: 0});
date.isDate = true;
+ date.utc(true);
return date;
};
@@ -260,9 +261,11 @@
Sao.Date.min = moment(new Date((-100000000 + 1) * 86400000));
Sao.Date.min.set({hour: 0, minute: 0, second: 0, millisecond: 0});
Sao.Date.min.isDate = true;
+ Sao.Date.min.utc(true);
Sao.Date.max = moment(new Date(100000000 * 86400000));
Sao.Date.max.set({hour: 0, minute: 0, second: 0, millisecond: 0});
Sao.Date.max.isDate = true;
+ Sao.Date.max.utc(true);
Sao.DateTime = function(
year, month, day,