© 2026 Hedgehog Software, LLC
async function getNTPTime() { const ntpApiUrl = 'http://worldtimeapi.org/api/timezone/Etc/UTC'; try { const ntpResponse = await fetch(ntpApiUrl); if (!ntpResponse.ok) { throw new Error(`NTP server responded with status ${ntpResponse.status}`); } const ntpData = await ntpResponse.json(); const epochTimeInMs = ntpData.unixtime * 1000; return epochTimeInMs; } catch (error) { throw new Error("Failed to fetch NTP time: " + error.message); } }
Error: Failed to fetch NTP time: NTP server responded with status 520
Join the Discord to ask follow-up questions and connect with the community
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
87,367 Members