Re: [go-nuts] time.ParseInLocation fails silently

2021-05-28 Thread 'Axel Wagner' via golang-nuts
IMO, if we change it, we should change the ";" into ", while". I think natural language is better than formatted bullet points. On Fri, May 28, 2021 at 1:45 PM NieomylnieJa wrote: > Thank you for your responses. While I'm convinced that `ParseInLocation` > works as intended and I do get that UTC

Re: [go-nuts] time.ParseInLocation fails silently

2021-05-28 Thread NieomylnieJa
Thank you for your responses. While I'm convinced that `ParseInLocation` works as intended and I do get that UTC is an unambiguous zone, the only thing I still have problem with is with the way this is phrased in the docs. I had 5 of my colleagues looking at it and none of us has had clarity as

Re: [go-nuts] time.ParseInLocation fails silently

2021-05-28 Thread Ian Davis
On Fri, 28 May 2021, at 11:32 AM, NieomylnieJa wrote: > But the docs state something different: > > // ParseInLocation is like Parse but differs in two important ways. > // First, in the absence of time zone information, Parse interprets a time as > UTC; > // ParseInLocation interprets the time a

Re: [go-nuts] time.ParseInLocation fails silently

2021-05-28 Thread Jan Mercl
On Fri, May 28, 2021 at 12:32 PM NieomylnieJa wrote: > But the docs state something different: > > // ParseInLocation is like Parse but differs in two important ways. > // First, in the absence of time zone information, Parse interprets a time as > UTC; > // ParseInLocation interprets the time a

Re: [go-nuts] time.ParseInLocation fails silently

2021-05-28 Thread NieomylnieJa
But the docs state something different: // ParseInLocation is like Parse but differs in two important ways. // First, in the absence of time zone information, Parse interprets a time as UTC; // ParseInLocation interprets the time as in the given location. // Second, when given a zone offset or ab

Re: [go-nuts] time.ParseInLocation fails silently

2021-05-26 Thread Ian Lance Taylor
On Wed, May 26, 2021 at 9:09 AM NieomylnieJa wrote: > > https://play.golang.org/p/LSIObUBjLLn > > What I expected was an error since UTC offset doesn't match that of > 'Europe/Warsaw' (+01:00), but instead the method returns no error and time > which 'loc` is nil. Not to mention I was expecting

[go-nuts] time.ParseInLocation fails silently

2021-05-26 Thread NieomylnieJa
Hey :) https://play.golang.org/p/LSIObUBjLLn What I expected was an error since UTC offset doesn't match that of 'Europe/Warsaw' (+01:00), but instead the method returns no error and time which 'loc` is nil. Not to mention I was expecting this method to act like 'time.Parse' + 'time.In' chaine