diff options
Diffstat (limited to 'libgo/go/time/format.go')
-rw-r--r-- | libgo/go/time/format.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libgo/go/time/format.go b/libgo/go/time/format.go index ad52bab..efca3a9 100644 --- a/libgo/go/time/format.go +++ b/libgo/go/time/format.go @@ -41,8 +41,8 @@ const ( ANSIC = "Mon Jan _2 15:04:05 2006" UnixDate = "Mon Jan _2 15:04:05 MST 2006" RubyDate = "Mon Jan 02 15:04:05 -0700 2006" - RFC822 = "02 Jan 06 1504 MST" - RFC822Z = "02 Jan 06 1504 -0700" // RFC822 with numeric zone + RFC822 = "02 Jan 06 15:04 MST" + RFC822Z = "02 Jan 06 15:04 -0700" // RFC822 with numeric zone RFC850 = "Monday, 02-Jan-06 15:04:05 MST" RFC1123 = "Mon, 02 Jan 2006 15:04:05 MST" RFC1123Z = "Mon, 02 Jan 2006 15:04:05 -0700" // RFC1123 with numeric zone @@ -714,7 +714,7 @@ func Parse(layout, value string) (Time, error) { } // Special case: do we have a fractional second but no // fractional second in the format? - if len(value) > 2 && value[0] == '.' && isDigit(value, 1) { + if len(value) >= 2 && value[0] == '.' && isDigit(value, 1) { _, std, _ := nextStdChunk(layout) if len(std) > 0 && std[0] == '.' && isDigit(std, 1) { // Fractional second in the layout; proceed normally |