DEV Community

Biruk
Biruk

Posted on

I built an open source alternative to TimeAPI.io

Sometimes you just need a simple API to get the current date and time.

While working on different projects, I wanted a free API that could return the current time, convert timezones, and even find the local time from an IP address or GPS coordinates. I couldn't find exactly what I wanted, so I decided to build one.

I created Open TimeAPI.

It's a free and open source REST API inspired by TimeAPI.io. Anyone can run it on their own server or use it as a starting point for their own project.

What it can do

Here are some of the features:

  • Get the current Unix timestamp (seconds, milliseconds, microseconds, or nanoseconds)
  • Get the current UTC time
  • Get the current date and time for any IANA timezone
  • Find the local time from latitude and longitude
  • Find the local time from an IP address
  • Get a list of all supported timezones
  • Built-in Swagger documentation
  • Docker support

Built with

The project is built with:

  • Python
  • FastAPI
  • HTML, CSS, and JavaScript
  • Docker

I wanted to keep the project simple, fast, and easy to deploy.

Why I made it

The main goal was to build something that is easy to self-host and easy to use.

Instead of depending on a third-party service, you can run your own instance and have full control over it.

Try it out

If you'd like to check it out, here are the links:

I'd love to hear your feedback, ideas, or feature requests. If you find a bug or have suggestions, feel free to open an issue or contribute.

Thanks for reading!

Top comments (0)