How to get the current date and time in london with JavaScript

1 Answer

0 votes
const dt = new Date();
 
console.log(dt.toLocaleString('en-GB', { timeZone: 'Europe/London' })); 
 
 
 
/*
run:
 
11/02/2021, 07:44:55
 
*/

 



answered Feb 11, 2021 by avibootz
edited Mar 4, 2022 by avibootz

Related questions

1 answer 121 views
1 answer 105 views
1 answer 256 views
1 answer 206 views
1 answer 153 views
1 answer 167 views
1 answer 178 views
...