summaryrefslogtreecommitdiff
path: root/src/components/ScanView.js
diff options
context:
space:
mode:
authorErnst Widerberg <ernst@sunet.se>2022-04-26 09:30:16 +0200
committerErnst Widerberg <ernst@sunet.se>2022-04-26 09:30:16 +0200
commitdc37413149a3a2e92c1686e56464efd9497e8dd6 (patch)
treee927feae62c830d7cce0389d72820ec4f32373d2 /src/components/ScanView.js
parent8f68fd5c6afa73fa86b8257c675614825ff17c5d (diff)
Update for timestamp change
Diffstat (limited to 'src/components/ScanView.js')
-rw-r--r--src/components/ScanView.js11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/components/ScanView.js b/src/components/ScanView.js
index a6d5bb0..00c6ddb 100644
--- a/src/components/ScanView.js
+++ b/src/components/ScanView.js
@@ -48,9 +48,7 @@ class ScanView extends React.Component {
this.setState({
loaded: true,
...json.docs,
- timestamp_in_utc: new Date(
- json.docs.timestamp_in_utc.replace(/ UTC$/, "Z")
- )
+ timestamp: new Date(json.docs.timestamp)
});
})
.catch(e => this.props.setError(e));
@@ -63,7 +61,7 @@ class ScanView extends React.Component {
() =>
this.setState(prevState => ({
rescanInProgress: false,
- timestamp_in_utc: Date.now()
+ timestamp: Date.now()
})),
2000
);
@@ -127,10 +125,7 @@ class ScanView extends React.Component {
>
<div>
Latest scan: &nbsp;&nbsp;&nbsp;
- {dateFormat(
- this.state.timestamp_in_utc,
- "isoUtcDateTime"
- )}
+ {dateFormat(this.state.timestamp, "isoUtcDateTime")}
</div>
<div
style={{