I am using Date()
to get the current time in local time zone. And I have formatted that as follows:
this.today = new Date();
from = new DatePipe('en-Us').transform(this.today, 'dd:MM:yyyy hh-mm-ss');
Now I want to convert the from
date time to Europe/London
time zone.
How Can I do this without moment
.
Please help me
I solved my issue by adding an another parameter for timezone according to https://angular.io/api/common/DatePipe
Here is the update code:
to = new DatePipe('en-Us').transform(this.today, 'dd:MM:yyyy hh-mm-ss', 'GMT+1');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With