Question : how to get utc time in angular
Answered by : fancy-fly-z8fpi7xo11pk
var d = new Date();
var n = d.getUTCDate();
Source : | Last Update : Mon, 28 Dec 20
Question : how to convert utc time to local time angular
Answered by : uptight-unicorn-u7htux8dvrfd
if your time looks like today = '2019-08-08T08:57:59' then just concat 'z' at the end to state it as UTC then run through date pipe like
<div>{{ today+'Z' | date : 'EEEE, MMMM d, h:mm:ss' }}</div>
Source : | Last Update : Thu, 23 Dec 21