DEV Community

Chris Yau
Chris Yau

Posted on

๐Ÿš€ I built a Free, Open World Time API (No API Keys, CORS Enabled)

๐Ÿš€ Finally, a Free World Time API (No Sign-up, No Keys)

Handling timezones in software development is universally painful. Between Daylight Saving Time (DST) switches, leap seconds, and server drift, getting the simple question โ€” โ€œWhat time is it in Tokyo right now?โ€ โ€” can be surprisingly complex.

While there are plenty of APIs out there, most of them require you to sign up, manage API keys, or deal with strict rate limits just to get a simple JSON timestamp.

I wanted a tool that I could just use without the hassle.

So, I built the Time.Now Developer API.

It is free, public, CORS-enabled, and requires no API keys.

All information is here: https://time.now/developer


๐ŸŒ What this API offers you

I designed this to be the simplest way to add time synchronization to your apps. Here is what you get out of the box:

  • Zero Friction

    No API keys. No sign-ups. Just make a GET request.

  • Atomic Precision

    Current local time synchronized with atomic clocks.

  • Timezone Intelligence

    All the messy DST logic is handled for you. You get the current status (dst: true/false) and exact offsets.

  • Geo-IP Detection

    Use the /ip endpoint to automatically detect a user's timezone based on their connection.

  • Frontend Ready

    Fully CORS-enabled. Fetch directly from React, Vue, or vanilla JS โ€” no proxy required.


โšก Quick Start

You can test it right now in your browser or terminal.

Base endpoint:

https://time.now/developer/api


1๏ธโƒฃ Get Time by Location

Want to know the current time in London? Just GET the area and location.

curl https://time.now/developer/api/timezone/Europe/London

JSON Response:

{
"abbreviation": "BST",
"datetime": "2023-10-05T14:30:00.123456+01:00",
"day_of_week": 4,
"day_of_year": 278,
"dst": true,
"dst_offset": 3600,
"timezone": "Europe/London",
"unixtime": 1696512600,
"utc_datetime": "2023-10-05T13:30:00.123456Z",
"utc_offset": "+01:00",
"week_number": 40
}


2๏ธโƒฃ Auto-Detect a Userโ€™s Time

Perfect for frontend apps when you want a server-verified local time without asking for GPS permissions.

fetch('https://time.now/developer/api/ip')
.then(res => res.json())
.then(data => {
console.log(Your server time is: ${data.datetime});
console.log(You are in: ${data.timezone});
});


๐Ÿ’ก When should you use this?

This API is useful whenever you need an external source of truth for time.

๐Ÿ”Œ IoT & Smart Devices

Arduino, ESP32, Raspberry Pi, and similar devices often lack battery-backed RTCs.

Call this API on boot to sync accurate system time instantly.

๐ŸŒ Global Scheduling

If a user in New York schedules something for a user in Tokyo, donโ€™t calculate offsets manually.

Query both timezones and let the API handle DST and offsets correctly.

๐ŸŽฎ Preventing Client-Side Cheating

Never trust new Date() in browsers โ€” users can change their system clock.

Use the unixtime value from the API to enforce accurate countdowns and deadlines.


๐Ÿš€ Try it out

I built this as a hassle-free utility for the developer community.

Base URL: https://time.now/developer/api

Docs & Guides: View the Developer Hub

There are copy-paste integration examples for Python, Go, PHP, Java, Swift, and more in the docs.

Let me know in the comments if you find it useful โ€” happy coding! ๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘ฉโ€๐Ÿ’ป

Top comments (0)