-
Bug
-
Resolution: Fixed
-
Normal
-
None
-
Security Level: Jimmy
-
None
-
ZK 8.6.2 S2
Steps to Reproduce
run the zul snippet below
-> see messages in the console
<zk> <script> console.log(zk.mm("2037-04-01T00:00:00-06:00").tz("America/Denver").toString()); console.log(zk.mm("2038-04-01T00:00:00-06:00").tz("America/Denver").toString()); console.log(zk.mm("2037-04-01T00:00:00+02:00").tz("Europe/Berlin").toString()); console.log(zk.mm("2038-04-01T00:00:00+02:00").tz("Europe/Berlin").toString()); console.log("moment.version", moment.version); console.log(moment("2037-04-01T00:00:00-06:00").tz("America/Denver").toString()); console.log(moment("2038-04-01T00:00:00-06:00").tz("America/Denver").toString()); console.log(moment("2037-04-01T00:00:00+02:00").tz("Europe/Berlin").toString()); console.log(moment("2038-04-01T00:00:00+02:00").tz("Europe/Berlin").toString()); </script> </zk>
Current Result
the daylight savings information is missing after 2038 in the current version of moment.js included in ZK, fixed in the latest version of moment.js
Expected Result
regularly updates of moment.js to reduce manual upgrade effort of external JS libraries
Debug Info
Root Cause
https://github.com/moment/moment-timezone/issues/401
Workaround
replace moment.js with a newer version e.g.:
<?script src="https://momentjs.com/downloads/moment.min.js"?> <?script src="https://momentjs.com/downloads/moment-timezone-with-data.min.js"?> <!--workaround replace zk.mm with current moment version--> <?script content="zk.mm=moment"?>
- relates to
-
ZK-4656 Update moment-timezones-with-data.js (tzdata 2020a)
- Closed