From a2c94d09dd96f0e791c05f5ce1a5fc5c7c537df0 Mon Sep 17 00:00:00 2001 From: Janne Savolainen Date: Mon, 13 Jun 2022 12:55:25 +0300 Subject: [PATCH] Introduce helper for getting current date time in UTC Signed-off-by: Janne Savolainen --- src/common/utils/date/get-current-date-time.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/common/utils/date/get-current-date-time.ts diff --git a/src/common/utils/date/get-current-date-time.ts b/src/common/utils/date/get-current-date-time.ts new file mode 100644 index 0000000000..bf3df2bd78 --- /dev/null +++ b/src/common/utils/date/get-current-date-time.ts @@ -0,0 +1,7 @@ +/** + * Copyright (c) OpenLens Authors. All rights reserved. + * Licensed under MIT License. See LICENSE in root directory for more information. + */ +import moment from "moment"; + +export const getCurrentDateTime = () => moment().utc().format();