Skip to content

Agilicus/go-timezone

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Timezone

A Go project for finding timezone information. It retrieves the following information from the system.

  • Offset from UTC: The offset represents the difference in hours and minutes from Coordinated Universal Time (UTC).
  • Timezone Abbreviations: Timezones are often associated with three-letter abbreviations, such as "IST" (Indian Standard Time) or "EST" (Eastern Standard Time).
  • Daylight Saving Time (DST): Many timezones observe Daylight Saving Time, which is the practice of adjusting the clocks forward by one hour during a specific period of the year.
  • Timezone Name: A timezone is identified by a name that represents its location, such as "Asia/Kolkata" or "America/New_York"."

Usage

Run the following command to see the JSON output

go run main.go

JSON output

{
	"utc_offset": "+05:30",
	"abbr": "IST",
	"is_dst": false,
	"iana_name": "Asia/Kolkata"
}

About

Gathering Timezone Information in GoLang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%