From 5fab7325fa2cbd5bfaac1618f41b7d47ffeaa8ad Mon Sep 17 00:00:00 2001 From: u-e Date: Wed, 6 Feb 2019 15:13:59 +0300 Subject: [PATCH] fixed time issue --- src/components/postListItem/view/postListItemView.js | 2 +- src/utils/time.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/postListItem/view/postListItemView.js b/src/components/postListItem/view/postListItemView.js index 9b7185470..f8971a066 100644 --- a/src/components/postListItem/view/postListItemView.js +++ b/src/components/postListItem/view/postListItemView.js @@ -53,7 +53,7 @@ class PostListItemView extends Component { { +export const getTimeFromNow = (value, isWithoutUtc) => { if (!value) return null; + if (isWithoutUtc) return moment(value).fromNow(); + return moment.utc(value).fromNow(); };