• Rob Pike's avatar
    time: expand acceptance of time zones when parsing · a454d2fd
    Rob Pike authored
    I tried to make it absolutely correct but there are too many
    conflicting definitions for the official list of time zones.
    Since when we're parsing we know when to expect
    a time zone and we know what they look like if not exactly
    what the definitive set is, we compromise. We accept any
    three-character sequence of upper case letters, possibly
    followed by a capital T (all four-letter zones end in T).
    
    There is one crazy special case (ChST) and the possibility
    of a signed hour offset for GMT.
    
    Fixes #3790
    I hope forever, but I doubt that very much.
    
    R=golang-dev, adg
    CC=golang-dev
    https://golang.org/cl/12969043
    a454d2fd
format.go 34 KB