From 52621e8db81ae386482fe57c7f99ba62d9981118 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 4 Jun 2020 19:30:24 -0500 Subject: [PATCH] intl.now() --> Date.now() --- app/soapbox/components/relative_timestamp.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/soapbox/components/relative_timestamp.js b/app/soapbox/components/relative_timestamp.js index 7cbc85660..e66c031c1 100644 --- a/app/soapbox/components/relative_timestamp.js +++ b/app/soapbox/components/relative_timestamp.js @@ -122,7 +122,7 @@ class RelativeTimestamp extends React.Component { }; state = { - now: this.props.intl.now(), + now: Date.now(), }; static defaultProps = { @@ -139,7 +139,7 @@ class RelativeTimestamp extends React.Component { componentWillReceiveProps(nextProps) { if (this.props.timestamp !== nextProps.timestamp) { - this.setState({ now: this.props.intl.now() }); + this.setState({ now: Date.now() }); } } @@ -166,7 +166,7 @@ class RelativeTimestamp extends React.Component { const delay = delta < 0 ? Math.max(updateInterval, unitDelay - unitRemainder) : Math.max(updateInterval, unitRemainder); this._timer = setTimeout(() => { - this.setState({ now: this.props.intl.now() }); + this.setState({ now: Date.now() }); }, delay); }