Re: [go-nuts] Parsing date with Timezone doesn't return UTC

2019-02-13 Thread Volker Dobler
There are several issues here. 1. If you use fmt.Println to display a time.Time it will generate a human readable output but this does _not_ accurately reflect all technical internal details of a time.Time. It is often a bad idea to simply dump stuff with fmt.Println. 2. time.Parse and timezones

Re: [go-nuts] Parsing date with Timezone doesn't return UTC

2019-02-13 Thread Pepa
Thank you for answering me. That makes sense. The reason why I noticed that was because I have a test and wanted to ensure that the time is properly parsed. But I can't construct the expected value. Imagine this test: func TestTemp(t *testing.T) { toTest := "20190211T103847+" parsed,

Re: [go-nuts] Parsing date with Timezone doesn't return UTC

2019-02-11 Thread Ian Lance Taylor
On Mon, Feb 11, 2019 at 10:53 AM wrote: > > Hi all, please could you help me with a simple problem? > > I have some parsing code like this: https://play.golang.org/p/6bVyWg4FCVN > > It writes > > 20190211T103847+ > > 2019-02-11 10:38:47 + UTC > > > on the server. > > When I put the code i