How to get IST and PST string from a date in Angular material?

38 views Asked by At

I need to store IST and PST strings based on the current browser timezone.

I have used moment library to get that string, but it throws an error, I have tried several other ways as well but did not get the desired string

const timezone = moment.tz(moment.tz.guess()).format('z');
console.log(timezone); // eg: PST   
0

There are 0 answers