How to get the current date and time in great britain with JavaScript

1 Answer

0 votes
const d = new Date();

console.log(d.toLocaleString('en-GB', { timeZone: 'UTC' })); 



/*
run:

11/02/2021, 07:39:16

*/

 



answered Feb 11, 2021 by avibootz

Related questions

1 answer 277 views
1 answer 412 views
1 answer 264 views
3 answers 517 views
4 answers 601 views
...