From 983ba9466a2e95bb26f27d975a3fdb874dea5d84 Mon Sep 17 00:00:00 2001 From: Alfonso Salces Date: Wed, 28 Sep 2022 11:23:56 +0200 Subject: [PATCH] MOBILE-4131 time: Return ISO string in toDatetimeFormat function --- src/core/services/utils/time.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core/services/utils/time.ts b/src/core/services/utils/time.ts index e664bb5b8..fd44ad144 100644 --- a/src/core/services/utils/time.ts +++ b/src/core/services/utils/time.ts @@ -255,9 +255,7 @@ export class CoreTimeUtilsProvider { * @return Formatted time. */ toDatetimeFormat(timestamp?: number): string { - timestamp = timestamp || Date.now(); - - return this.userDate(timestamp, 'YYYY-MM-DDTHH:mm:ss.SSS', false) + 'Z'; + return moment(timestamp || Date.now()).toISOString(); } /**