Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-22653

javascript Date.parse dont parse valid ISO_8601 date

XMLWordPrintable

      In Preprocessing

       

      Date.parse('2023-04-06T12:11:59+0300')/1000

      Result: 1979703119

       

      Valid result: 1680772319 (checked over browser js console)

       

      Adding  ":" to TZ part (2023-04-06T12:11:59+03:00) will fix this problem

       

      https://en.wikipedia.org/wiki/ISO_8601

      Time offsets from UTC[edit

      The UTC offset is appended to the time in the same way that 'Z' was above, in the form ±[hh]:[mm], ±[hh][mm], or ±[hh].

      Negative UTC offsets describe a time zone west of UTC±00:00, where the civil time is behind (or earlier) than UTC so the zone designator will look like "−03:00","−0300", or "−03"

      Positive UTC offsets describe a time zone at or east of UTC±00:00, where the civil time is the same as or ahead (or later) than UTC so the zone designator will look like "+02:00","+0200", or "+02".​

       

            zabbix.dev Zabbix Development Team
            asitnikov Andrew Sitnikov
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: