Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-9637

MomentJS warning after running sample code

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 20.1.0
    • Fix Version/s: 20.1.0, Meridian-2017.1.0
    • Component/s: None
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Sprint:
      Horizon - September 13th

      Description

      If I setup a basic nodeJS app in order to execute the sample code from the HOWTO against Meridian 2017 (to be more precise: ), it works, but I get a warning related with date manipulation and MomentJS:

      Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
      Arguments:
      [0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: 9/1/17 4:48 PM, _f: undefined, _strict: undefined, _locale: [object Object]
      Error
          at Function.createFromInputFallback (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:396:97)
          at configFromString (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:2229:15)
          at configFromInput (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:2587:13)
          at prepareConfig (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:2570:13)
          at createFromConfig (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:2537:44)
          at createLocalOrUTC (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:2623:16)
          at createLocal (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:2627:16)
          at hooks (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:106:29)
          at AlarmDAO.toDate (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:9531:20)
          at AlarmDAO.fromData (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:11005:38)
      got 10 alarms.
      node 16 (Barquisimeto) has 1 IP interfaces
      node 13 (Maracaibo) has 3 IP interfaces
      node 12 (Valencia) has 2 IP interfaces

        Attachments

          Activity

            People

            • Assignee:
              ranger Benjamin Reed
              Reporter:
              agalue Alejandro Galue
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: