Javascript temporal cookbok

How to get the current date and time in the local time zone ?

1 /**
2  * Get the current date in JavaScript
3  * This is a popular question on Stack Overflow for dates in JS
4  * https://stackoverflow.com/questions/1531093/how-do-i-get-the-current-date-in-javascript
5  *
6  */
7
8 const dateTime = Temporal.now.dateTime(); // Gets the current date
9 dateTime.toString(); // returns the date in ISO 8601 date format