From 3ac5ebf808c06e166053a716a5dba823b49858d6 Mon Sep 17 00:00:00 2001 From: Joana Maia Date: Mon, 12 Jun 2023 14:39:19 +0100 Subject: [PATCH 1/2] Fix activities timestamp --- .../src/modules/auth/components/layout/auth-layout-side.vue | 2 +- frontend/src/utils/date.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/modules/auth/components/layout/auth-layout-side.vue b/frontend/src/modules/auth/components/layout/auth-layout-side.vue index 44536a9f5a..e46481dbe5 100644 --- a/frontend/src/modules/auth/components/layout/auth-layout-side.vue +++ b/frontend/src/modules/auth/components/layout/auth-layout-side.vue @@ -13,7 +13,7 @@ Find revenue opportunities in your open source data

- Centralize community, product, and customer data to understand which companies are engaging with your open source project. + Centralize community, product, and customer data to understand which companies are engaging with your open source project.

diff --git a/frontend/src/utils/date.js b/frontend/src/utils/date.js index db521dcbdd..e6797156bc 100644 --- a/frontend/src/utils/date.js +++ b/frontend/src/utils/date.js @@ -10,9 +10,9 @@ import config from '@/config'; * @param timestamp * @returns {string|string} */ -export const formatDateToTimeAgo = (timestamp) => (moment(timestamp).year() === 1970 +export const formatDateToTimeAgo = (timestamp) => (moment.utc(timestamp).year() === 1970 ? 'some time ago' - : moment(timestamp).fromNow()); + : moment.utc(timestamp).fromNow()); /** * From 95f1027a3776dba7a78f077829e8ba31e0b0ba13 Mon Sep 17 00:00:00 2001 From: Joana Maia Date: Mon, 12 Jun 2023 16:35:19 +0100 Subject: [PATCH 2/2] Update validation year --- frontend/src/utils/date.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/utils/date.js b/frontend/src/utils/date.js index e6797156bc..4df488fded 100644 --- a/frontend/src/utils/date.js +++ b/frontend/src/utils/date.js @@ -10,7 +10,7 @@ import config from '@/config'; * @param timestamp * @returns {string|string} */ -export const formatDateToTimeAgo = (timestamp) => (moment.utc(timestamp).year() === 1970 +export const formatDateToTimeAgo = (timestamp) => (moment.utc(timestamp).year() < 2000 ? 'some time ago' : moment.utc(timestamp).fromNow());