Skip to content
How to add current time
Profile icon
sn236

How do I add the current time of the user in html,css,js.

You are viewing a single comment. View All
Profile icon
SixBeeps

@sn236
My bad, it looks like Date.now() doesn't return a date like I remembered. Instead, construct a new Date object to get the current date in local time.

console.log(new Date())