I know how to display the DateTime in angular using by pipe
{{ dateObj | date:'medium' }}
How to display the GMT time using a pipe
I know how to display the DateTime in angular using by pipe
{{ dateObj | date:'medium' }}
How to display the GMT time using a pipe
You can achieve the above by making the following changes:
{{ today | date : 'medium':'GMT' }}
According to the DatePipe documentation,
The 2nd parameter refers to the timezone. Therefore, you can simply just pass 'GMT' to your expression, and it should transform the date values to the required timezone.
A timezone offset (such as '+0430'), or a standard UTC/GMT or continental US timezone abbreviation. Default is the local system timezone of the end-user's machine.
{{ value_expression | date [ : format [ : timezone [ : locale ] ] ] }}