Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4290

update moment.js and moment-timezones-with-data.js

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.6.2
    • Component/s: Components
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      ZK 8.6.2 S2

      Description

      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"?>
      

        Attachments

          Activity

            People

            • Assignee:
              Leon03 Leon03
              Reporter:
              cor3000 cor3000
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Time Spent - 3 hours Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - 3 hours Remaining Estimate - 1 hour
                3h