Skip to content

Instantly share code, notes, and snippets.

@sthorne
Created February 22, 2015 00:32
Show Gist options
  • Save sthorne/68b2f08faab1e170d650 to your computer and use it in GitHub Desktop.
Save sthorne/68b2f08faab1e170d650 to your computer and use it in GitHub Desktop.
Go - Determine if Timezone is valid
import "fmt"
import "time"
_, e := time.LoadLocation("America/Denver")
if e != nil {
fmt.Println("Timezone is not valid")
return
}
fmt.Println("Timezone is valid")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment