diff options
| author | Ernst Widerberg <ernst@sunet.se> | 2022-04-25 10:51:40 +0200 |
|---|---|---|
| committer | Ernst Widerberg <ernst@sunet.se> | 2022-04-25 10:51:40 +0200 |
| commit | b5c603f9d4fd4d1f96a3f7e529295b4cfb624f5d (patch) | |
| tree | 5551f7016d0497b2d0dbf472f751e3bdec0a885f /src/components/ScanView.js | |
| parent | d3c1fae9851a15b60febf26bbf588412782da6c4 (diff) | |
Convert timestamp to JS Date when fetching
Diffstat (limited to 'src/components/ScanView.js')
| -rw-r--r-- | src/components/ScanView.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/ScanView.js b/src/components/ScanView.js index aefd287..9fe57d7 100644 --- a/src/components/ScanView.js +++ b/src/components/ScanView.js @@ -39,7 +39,12 @@ class ScanView extends React.Component { `Unexpected status from soc_collector: ${json.status}` ); this.setState({ - object: json.docs + object: { + ...json.docs, + timestamp_in_utc: new Date( + json.docs.timestamp_in_utc.replace(/ UTC$/, "Z") + ) + } }); }) .catch(e => this.props.setError(e)); |
