Skip to content

Latest commit

 

History

History
58 lines (36 loc) · 1.21 KB

README.md

File metadata and controls

58 lines (36 loc) · 1.21 KB

TimeZoneApi

It is a Time zone converter API in golang, it converts the time from one time zone to another timezone.

Prerequisite

Please install and set-up Golang as well as install and set-up Postman on your system in advance.

How to run this project?

  1. Clone this Project and Navigate to the folder.
https://github.com/k-avy/gotimezoneapi.git
cd gotimezoneapi
  1. Build the project using following command.
go build ./cmd/time
  1. Run the executable in your vscode terminal.
./time
  1. You can directly run it by the following command.
go run ./cmd/time
  1. You can see tis work on Postman on your system.

Features

  1. You can convert the current time from one time zone to another using the following address with GET Method.
 http://localhost:8080/convert?from="timezone1"&to="timezone2"
  1. You can convert the desired time from one time zone to another using the following address with GET Method.
http://localhost:8080/converttz?from="desiredtime"_"timezone1"&to="timezone2"

/convert

alt text

/converttz

alt text