On Fri, May 28, 2021 at 12:32 PM NieomylnieJa <matihaw...@gmail.com> 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 as in the given location. > // Second, when given a zone offset or abbreviation, Parse tries to match it > // against the Local location; ParseInLocation uses the given location. > > The docs explicitly state that: "ParseInLocation interprets the time as in > the given location". This behavior in conjunction with the docs were > confusing to me and a number of my coworkers, shouldn't they be updated? It's > not quiet straightforward that this line "First, in the absence of time zone > information (...)" refers to "ParseInLocation" too, the semicolon doesn't > help either, as the interpretation may differ: Merriam-Webster reference My understanding is that UTC time is the same regardless of location/time zone where it is interpreted. If that's correct, then ParseInLocation works as intended. -- 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/CAA40n-W%3DYX8sDgH22a2h0NO-kOM7p0khno2CD12QJaom%3DLrmGg%40mail.gmail.com.