Fetch API (Temporarily Inactive)
fetch("https://opentimeapi.com/api",{ method: "POST", redirect: "follow" }) .then(response => response.json()) .then(response => { console.log(response); });
HTML Script
<script src="https://api.opentimeapi.com/index.js"></script> getTimezone("",function(time){ console.log(time); });
Response Example
{ zone: "Pacific/Auckland" secs: 52, mins: 19, hour: 0, day: 4, date: 12, month: 8, year: 2024, time: 1726057192140 names: { day: "Thursday", month: "September" }, more: { dayOfYear: 255, utcTime: 1726047207003, isMorning: true, abbreviation: ["AM","a.m."], dateSuffix: "th" } }
Supported Timezones