diff --git a/webapp/components/post_view/components/post_time.jsx b/webapp/components/post_view/components/post_time.jsx index 369a429a97..c8e57f6a94 100644 --- a/webapp/components/post_view/components/post_time.jsx +++ b/webapp/components/post_view/components/post_time.jsx @@ -6,7 +6,7 @@ import React from 'react'; import Constants from 'utils/constants.jsx'; import PureRenderMixin from 'react-addons-pure-render-mixin'; -import {FormattedTime} from 'react-intl'; +import {getDateForUnixTicks} from 'utils/utils.jsx'; export default class PostTime extends React.Component { constructor(props) { @@ -28,12 +28,7 @@ export default class PostTime extends React.Component { render() { return ( ); } diff --git a/webapp/components/rhs_comment.jsx b/webapp/components/rhs_comment.jsx index 85fe8abdf0..c7b005845e 100644 --- a/webapp/components/rhs_comment.jsx +++ b/webapp/components/rhs_comment.jsx @@ -19,7 +19,7 @@ import * as PostUtils from 'utils/post_utils.jsx'; import Constants from 'utils/constants.jsx'; import {Tooltip, OverlayTrigger} from 'react-bootstrap'; -import {FormattedMessage, FormattedDate} from 'react-intl'; +import {FormattedMessage} from 'react-intl'; import loadingGif from 'images/load.gif'; @@ -386,6 +386,15 @@ export default class RhsComment extends React.Component { ); } + const timeOptions = { + day: 'numeric', + month: 'short', + year: 'numeric', + hour: '2-digit', + minute: '2-digit', + hour12: !this.props.useMilitaryTime + }; + return (
@@ -398,15 +407,7 @@ export default class RhsComment extends React.Component { {botIndicator}
  • {flagTrigger}
  • diff --git a/webapp/components/rhs_root_post.jsx b/webapp/components/rhs_root_post.jsx index a0edd716ea..aa663bda79 100644 --- a/webapp/components/rhs_root_post.jsx +++ b/webapp/components/rhs_root_post.jsx @@ -20,7 +20,7 @@ import * as PostUtils from 'utils/post_utils.jsx'; import Constants from 'utils/constants.jsx'; import {Tooltip, OverlayTrigger} from 'react-bootstrap'; -import {FormattedMessage, FormattedDate} from 'react-intl'; +import {FormattedMessage} from 'react-intl'; import React from 'react'; @@ -357,6 +357,15 @@ export default class RhsRootPost extends React.Component { flagFunc = this.flagPost; } + const timeOptions = { + day: 'numeric', + month: 'short', + year: 'numeric', + hour: '2-digit', + minute: '2-digit', + hour12: !this.props.useMilitaryTime + }; + return (
    {channelName}
    @@ -368,15 +377,7 @@ export default class RhsRootPost extends React.Component { {botIndicator}