Home:ALL Converter>Angular4 date formatting issue with timezone

Angular4 date formatting issue with timezone

Ask Time:2019-01-24T14:41:48         Author:VJay

Json Formatter

I get date from json response as "createTimestamp":"2019-01-22T18:57:47+08:00". This is singapore timestamp. I wanted to show only Singapore time irrespective of location accessed.

Now, the problems is that, date is being converted to the format specified but with local timezone.

Actual timestamp: 2019-01-22T18:57:47+08:00 (singapore time) when accessed from India : 22 Jan 2019 16:27 when accessed from Singapore : 22 Jan 2019 18:57

I tried date: 'dd MMM yyyy HH:mm' didn't solve mytimezone issue.

I wanted to use custom date pipe to convert it to dd MMM yyyy HH:mm format

Author:VJay,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/54340731/angular4-date-formatting-issue-with-timezone
yy