Skip to content

maruf571/geolocation2timezone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geolocation-to-timezone

Quality Gate Status Bugs Code Smells

This project aims to explore solutions for retrieving the timezone from geolocation using Java.

Solutions

We have identified two suitable offline solutions and a Google API for obtaining timezone information based on geolocation

Usage

Sample request

http://localhost:8080/timeshape/lat/23.999941/lon/90.420273

Response

{
  "dstOffset": 0,
  "rawOffset": 21600,
  "status": "OK",
  "timeZoneId": "Asia/Dhaka",
  "timeZoneName": "Bangladesh Time",
  "localTime": "01:33:00.61443",
  "utcTime": "19:33:00.588057"
}

Prerequisites

  • Java 17
  • Maven
  • Docker
  • Docker-compose
  • Google Timezone API (Optional)

How to run

Run code locally:

git clone https://github.com/maruf571/geolocation2timezone.git
mvn spring-boot:run

Run test cases:

mvn test

Using docker-compose

docker-compose up

About

This project aims to explore solutions for retrieving the timezone from geolocation using Java.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published