2 Replies Latest reply on Jul 10, 2020 3:01 AM by Roland Pocek

    time.formatLocal v11 vs v12

    Roland Pocek
      Share This:

      hi Andrew Waters Brice-Emmanuel Loiseaux

       

      i have a pattern that uses the time.parseLocal function like that

       

      last_login_time := result_attributes[6];

      converted := regex.extract(last_login_time, regex "(\d\d\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)", raw "\1-\2-\3 \4:\5:\6");

      parsed    := time.parseLocal(converted);

      last_login_date := time.formatLocal(parsed,raw "%m/%d/%Y %I:%M:%S %p");

       

      the input is a timestamp in the format 20200702084304 and sometimes its 18700101010000

       

      in v11 for year of 1870 i do get error for formatLocal function because its ealier than 1970

       

      in v12 i replayed the data for this host and the same pattern and the function does not return an error and the date is correctly converted

       

      was there a change in behaviour?

      thank you in advance

      regards

      rop