Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
time: Parse not parsing PST properly on playground #12388
The playground does not have timezone information.
Time zone names like PST are parsed based on your local timezone information. On my Ubuntu GNU/Linux system, I get the correct value because the file /usr/share/zoneinfo/PST8PDT exists. If a file like that does not exist on your system, then the results are expected.
I'm closing this as expected, but please feel free to reopen if you disagree.
The playground does have timezone.zip embedded in its fake filesystem. The reason the program doesn't work is because to interpret a short time zone time, the time package needs to know the location, and the playground doesn't have a default location. For example, if you specifically parse in a location where PST make sense, it should work. http://play.golang.org/p/hdv8x1WYXt