loghelper: Fix a bug when parsing a JSON-parsed record. In those cases the time is not Date format and needs to be parsed beforehand.
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded

package: Release new version
This commit is contained in:
Jonatan Nilsson 2022-04-01 10:08:24 +00:00
parent 455f667e88
commit e853474cdd
2 changed files with 4 additions and 2 deletions

View file

@ -68,8 +68,10 @@ export function formatLog(data) {
delete rec.v; delete rec.v;
let d = new Date(rec.time)
// Time. // Time.
var time = '[' + rec.time.toISOString().replace('T', ' ').replace('Z', '') + ']' var time = '[' + d.toISOString().replace('T', ' ').replace('Z', '') + ']'
time = stylize(time, 'none') time = stylize(time, 'none')
delete rec.time; delete rec.time;

View file

@ -1,6 +1,6 @@
{ {
"name": "sc-manager", "name": "sc-manager",
"version": "2.0.1", "version": "2.0.2",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {