details: https://code.tryton.org/tryton/commit/2fb913af01e1
branch: 7.0
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
(grafted from accaf443e6d00b6349147fb5f3d3388af6ed1073)
diffstat:
sao/src/pyson.js | 1 -
sao/src/sao.js | 3 +++
2 files changed, 3 insertions(+), 1 deletions(-)
diffs (34 lines):
diff -r 6b821bd6f619 -r 2fb913af01e1 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
@@ -775,7 +775,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 6b821bd6f619 -r 2fb913af01e1 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
@@ -258,6 +258,7 @@
date.date(day);
date.set({hour: 0, minute: 0, second: 0, millisecond: 0});
date.isDate = true;
+ date.utc(true);
return date;
};
@@ -265,9 +266,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,