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 111 views
1 answer 89 views
1 answer 232 views
1 answer 194 views
1 answer 139 views
1 answer 153 views
1 answer 166 views
...