Can someone help me with this problem:Code:format := "2006-01-02T15:04:05 -0700 MST"dateToParse := "2006-01-02T15:04:05 -0700 PDT"parsedTime, err := time.Parse(format, dateToParse)fmt.Println("Error: ", err)fmt.Println("Parsed Representation:", parsedTime)fmt.Println("Local Representation: ", parsedTime.Local())name, offset := time.Now().Zone()fmt.Println("Time zone name: ", name)fmt.Println("Time zone offset:", offset)currentTime := time.Now()fmt.Println("Current time: ", currentTime)fmt.Println("Current time as Local: ", currentTime.Local())fmt.Println("Current time as UTC -> Local: ", currentTime.UTC().Local())Output:Error: <nil>Parsed Representation: 2006-01-02 15:04:05 -0700 PDTLocal Representation: 2006-01-02 14:04:05 -0800 PST
Time zone name: PDTTime zone offset: -25200Current time: 2013-04-10 22:17:49.690857 -0700 PDTCurrent time as Local: 2013-04-10 22:17:49.690857 -0700 PDTCurrent time as UTC -> Local: 2013-04-10 22:17:49.690857 -0700 PDT
Why would parsed date changed timezones when time.Now() manages to correctly preserve it?--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.