diff --git a/pkg/index/index.go b/pkg/index/index.go index 5b08fbd59..2ba24b46f 100644 --- a/pkg/index/index.go +++ b/pkg/index/index.go @@ -492,7 +492,7 @@ func (x *Index) PathLookup(signer, base *blobref.BlobRef, suffix string, at time } for _, path := range paths { - t, err := time.Parse(time.RFC3339, trimRFC3339Subseconds(path.ClaimDate)) + t, err := time.Parse(time.RFC3339, path.ClaimDate) if err != nil { continue } @@ -514,14 +514,6 @@ func (x *Index) PathLookup(signer, base *blobref.BlobRef, suffix string, at time return best, nil } -// TODO(bradfitz): remove this as of Go 1. shouldn't be needed anymore. -func trimRFC3339Subseconds(s string) string { - if !strings.HasSuffix(s, "Z") || len(s) < 20 || s[19] != '.' { - return s - } - return s[:19] + "Z" -} - func (x *Index) ExistingFileSchemas(wholeRef *blobref.BlobRef) (schemaRefs []*blobref.BlobRef, err error) { it := x.queryPrefix(keyWholeToFileRef, wholeRef) defer closeIterator(it, &err)