panic: unknown time zone America/New_York

1,283 views
Skip to first unread message

Johnson

unread,
May 30, 2013, 4:19:48 PM5/30/13
to google-ap...@googlegroups.com
I'm making a party scheduling app and since all the parties are going to be in NYC, I thought I'd store the times in the Eastern time zone. Any idea why this initial step isn't working? 

http://play.golang.org/p/lad4qUoyyC


package main

import (
"fmt"
"time"
)

func main() {
loc, err := time.LoadLocation("America/New_York")
if err != nil {
panic(err)
}

fmt.Printf("%+v", loc)
}


 
panic: unknown time zone America/New_York

goroutine 1 [running]:
main.main()
/tmpfs/gosandbox-641c4dbf_b537c84f_285baba8_9540e6d4_50f4d85c/prog.go:11 +0x72

Kyle Lemons

unread,
May 30, 2013, 4:52:28 PM5/30/13
to Johnson, google-appengine-go
That won't work on the Playground because it doesn't have access to /usr/share/zoneinfo.



--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengin...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Johnson

unread,
May 30, 2013, 4:54:05 PM5/30/13
to google-ap...@googlegroups.com, Johnson
Thanks, Kyle. It doesn't work on the dev_appserver on Windows, either. Any suggestions?
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

David Symonds

unread,
May 30, 2013, 6:44:21 PM5/30/13
to Johnson, google-ap...@googlegroups.com

Johnson

unread,
May 30, 2013, 7:11:01 PM5/30/13
to google-ap...@googlegroups.com, Johnson
That worked, David, thanks!

t = t.In(time.FixedZone("EST", 68400))
Reply all
Reply to author
Forward
0 new messages