Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/mileusna/timezones

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/mileusna/timezones

  • v0.0.0-20220627120747-ad570b2850c0
  • Source
  • Go
  • Socket score

Version published
Created
Source

Go/Golang package to list all timezones defined by OS (Linux or macOS)

Status

Tested on macOS and RHEL7, should work on other Linux distos as well.

Windows is currently not supported.

Installation

go get github.com/mileusna/timezones

Example

package main

import (
    "fmt"
    "strings"

    "github.com/mileusna/timezones"
)

func main() {

    // checks common zone info directories on your OS
    tzones := timezones.List()
    for _, tz := range tzones {
        fmt.Println(tz)
    }

    // if yor linux disto use some uncommon location for zoneinfo
    tzones = timezones.ListDir("/usr/share/zoneinfo/")
}

FAQs

Package last updated on 27 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc