From c5f13e095ec43c13e32c8254515a1eda186621a3 Mon Sep 17 00:00:00 2001 From: srgooglo Date: Sun, 16 Oct 2022 21:32:52 +0200 Subject: [PATCH] remove moment-timezone --- .../src/components/PostCard/components/header/index.jsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/app/src/components/PostCard/components/header/index.jsx b/packages/app/src/components/PostCard/components/header/index.jsx index 77d0f80a..20e29070 100755 --- a/packages/app/src/components/PostCard/components/header/index.jsx +++ b/packages/app/src/components/PostCard/components/header/index.jsx @@ -1,6 +1,5 @@ import React from "react" import classnames from "classnames" -import momentTimezone from "moment-timezone" import { DateTime } from "luxon" import { Image } from "components" @@ -18,11 +17,7 @@ export default (props) => { const updateTimeAgo = () => { let createdAt = props.postData.created_at ?? "" - const inputTimezone = momentTimezone.tz(createdAt).tz() - - const inputTimeInLocalTimezone = momentTimezone.tz(createdAt, inputTimezone).tz(momentTimezone.tz.guess()).format() - - const timeAgo = DateTime.fromISO(inputTimeInLocalTimezone).toRelative() + const timeAgo = DateTime.fromISO(createdAt).toRelative() setTimeAgo(timeAgo) }