TimeNow is a simple web application that allows users to input a city or country and retrieve the current time for that location. The app uses the OpenWeatherMap Geocoding API to fetch geographical coordinates and TimeZoneDB API to fetch the corresponding time based on those coordinates.
- Input any city or country to get the current local time.
- Dynamically updates the displayed time every second.
- Changes the background based on the time of day (daytime or nighttime).
- Provides a visually appealing interface with smooth transitions.
- User inputs a city or country name.
- The app retrieves the geographic coordinates using the OpenWeatherMap Geocoding API.
- Using the geographic coordinates, the app calls the TimeZoneDB API to retrieve the current time.
- The time is displayed and updated every second.
- The background image changes based on the current time (daytime or nighttime).
-
OpenWeatherMap Geocoding API
Used to convert the city or country input into geographical coordinates (latitude and longitude).- API Documentation: https://openweathermap.org/api/geocoding-api
-
TimeZoneDB API
Used to get the time and timezone information based on geographic coordinates.- API Documentation: https://timezonedb.com/api
- A basic understanding of HTML, CSS, and JavaScript.
- An active API key for both OpenWeatherMap and TimeZoneDB.
If you would like to contribute to this project, feel free to fork the repository and submit a pull request!
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request.