]> Cypherpunks repositories - gostls13.git/commitdiff
archive/zip: Document ModTime is always UTC
authorTyler Bunnell <tylerbunnell@gmail.com>
Mon, 5 May 2014 03:00:47 +0000 (23:00 -0400)
committerAndrew Gerrand <adg@golang.org>
Mon, 5 May 2014 03:00:47 +0000 (23:00 -0400)
Fixes #7592

LGTM=robert.hencke, adg
R=golang-codereviews, robert.hencke, gobot, adg
CC=golang-codereviews
https://golang.org/cl/90810043

src/pkg/archive/zip/struct.go

index 65e5238c3b45cd155f9299881ff37008d059381b..cb28e8324235544fa89130fd3a96f2af1a3837e1 100644 (file)
@@ -174,13 +174,13 @@ func timeToMsDosTime(t time.Time) (fDate uint16, fTime uint16) {
        return
 }
 
-// ModTime returns the modification time.
+// ModTime returns the modification time in UTC.
 // The resolution is 2s.
 func (h *FileHeader) ModTime() time.Time {
        return msDosTimeToTime(h.ModifiedDate, h.ModifiedTime)
 }
 
-// SetModTime sets the ModifiedTime and ModifiedDate fields to the given time.
+// SetModTime sets the ModifiedTime and ModifiedDate fields to the given time in UTC.
 // The resolution is 2s.
 func (h *FileHeader) SetModTime(t time.Time) {
        h.ModifiedDate, h.ModifiedTime = timeToMsDosTime(t)