Answers for "show the time zone of browser javascript"

0

time zone browser javascript

fetch("https://worldtimeapi.org/api/ip")
  .then(response => response.json())
  .then(data => console.log(data.timezone,data.datetime,data.dst));
Posted by: Guest on February-01-2021
0

show the time zone of browser javascript

const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
console.log(timezone); // Asia/Karachi
Posted by: Guest on October-26-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language