Skip to content
gocsPublic

About

look up time zone `curl -fsSL https://gocs.me/~/lutz | grep Asia/Manila`

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

look up time zone

...
<continent>/<city>/<subcategory> <hour> <minutes>
<continent>/<city>/<subcategory> <hour> <minutes>
<continent>/<city>/<subcategory> <hour> <minutes>
<continent>/<city>/<subcategory> <hour> <minutes>
...

dl timezone from iana (i.e. eggert/tz) parse for each continent merge data in one sorted file

  • download through http/ftp
  • unzip a compressed gzip file in memory
  • iterate through all files (only continents)
    • every iteration instatiates a scanner
    • every line is parsed to get a specific format
    • every line is sorted per insert
    • every after parsing is appended to the lookup file

running

  1. install go
  2. run the ff.
go build -o lutz cmd/main.go
./lutz

cron

the tz file is gonna be updated every month

About

look up time zone `curl -fsSL https://gocs.me/~/lutz | grep Asia/Manila`

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages