Skip to content

Instantly share code, notes, and snippets.

@apalmblad

apalmblad/gist:5470791

Last active Dec 16, 2015
Embed
What would you like to do?
go TZ issue
package main
import (
"fmt"
"time"
)
func main() {
tz, err := time.LoadLocation("Atlantic/South_Georgia")
if err != nil {
fmt.Println(err)
}
if tz != nil {
fmt.Println("Got TZ:", tz)
} else {
fmt.Println("TZ not received.")
}
fmt.Println(time.Now().In(tz).Format("3:04 PM MST"), tz)
}
// expected result: something like a time matching `zdump /usr/share/zoneinfo/Atlantic/South_Georgia`
// instead, UTC seems to be in use
// go version go1.0.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.