On Wed, May 26, 2021 at 9:09 AM NieomylnieJa <matihaw...@gmail.com> 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 this method to act like 
> 'time.Parse' + 'time.In' chained. I'm using go 1.16 btw. How comes it acts 
> like that?

Using Z as a timezone always means UTC.  ParseInLocation sets the
timezone location if the time string does not give an explicit
timezone.  In this case your time string does give an explicit
timezone: Z == UTC.

Ian

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcVAGCLh5n%2BAk%2B1Csj186X2DMPsUVLFgZ5Qf34M3YnS9qA%40mail.gmail.com.

Reply via email to