Re: [go-nuts] json time format discrepancy

2019-10-09 Thread Andrey Tcherepanov
Thanks Anderson, I think I got a classical PEBKAC problem here, so all is good now. On Wednesday, October 9, 2019 at 8:25:05 AM UTC-6, Anderson Queiroz wrote: > > Indeed looks odd, but as Jakob showed, it looks fine. I was playing > directly with the marshal/unmarshall and I didn't fine any prob

Re: [go-nuts] json time format discrepancy

2019-10-09 Thread Andrey Tcherepanov
Thanks Jakob. I am shamefully have to concur that I indeed messed up. Now I need to find where did I do it though :) Still curious - how RFC3339 works with parsing nanoseconds past decimal point? Andrey On Tuesday, October 8, 2019 at 11:29:29 PM UTC-6, Jakob Borg wrote: > > On 8 Oct 2019, at 1

Re: [go-nuts] json time format discrepancy

2019-10-09 Thread Anderson Queiroz
Indeed looks odd, but as Jakob showed, it looks fine. I was playing directly with the marshal/unmarshall and I didn't fine any problem either. My playground: https://play.golang.org/p/LLmQqxLKfME On Wednesday, 9 October 2019 07:29:29 UTC+2, Jakob Borg wrote: > > On 8 Oct 2019, at 19:27, Andrey Tc

Re: [go-nuts] json time format discrepancy

2019-10-08 Thread Jakob Borg
On 8 Oct 2019, at 19:27, Andrey Tcherepanov mailto:xnow4fippy...@sneakemail.com>> wrote: In this case it loses subsecond precision, and it just bit me (doctor says I will live). Is it a bug or some historically-important reasons that I am missing are in play there? I don't see this discrepanc

[go-nuts] json time format discrepancy

2019-10-08 Thread Andrey Tcherepanov
Fellas, Would someone kind to point me to a reasoning behind "func (t Time) MarshalJSON() ([]byte, error)" use "time.RFC3339Nano" formatting to spit out time in JSON, and "func (t *Time) UnmarshalJSON(data []byte) error " uses "time.RFC3339" to parse the same timestamp? I do expect serializati