-4

I need to show the current timezone, date and time on the web page in the same format as shown below every second with JavaScript.

Ex: (GMT-05:00) 8/16/2022 01:30:00 PM

Thanks in advance!

  • See [*Where can I find documentation on formatting a date in JavaScript?*](https://stackoverflow.com/questions/1056728/where-can-i-find-documentation-on-formatting-a-date-in-javascript) – RobG Aug 17 '22 at 10:48

1 Answers1

0

You can create a new date object using var date = Date() then you can parse out every details such as time, date and timezone from that object using https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date

this website contains all of the different things you can parse out

deep
  • 1