Simple REST API for getting current time in different timezones. This is the first assignment from Rest-Based Microservices API Development in Golang Course.
go run main.go
Response
{
"current_time": "2021-10-31 13:14:55.0414006 +0000 UTC"
}
Response
{
"Asia/Jakarta": "2021-10-31 20:16:26.2831456 +0700 WIB"
}
Response
{
"America/New_York": "2021-10-31 09:17:17.4514516 -0400 EDT",
"Asia/Jakarta": "2021-10-31 20:17:17.4514159 +0700 WIB"
}
Response
{
"error_message": "invalid timezone"
}