intl.now() --> Date.now()
This commit is contained in:
parent
6e1db9a013
commit
52621e8db8
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue