Merge pull request #3394 from alfonso-salces/MOBILE-4131

MOBILE-4131 time: Return ISO string in toDatetimeFormat function
main
Dani Palou 2022-09-30 07:42:42 +02:00 committed by GitHub
commit 7b1294dd86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -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();
}
/**