From: Tyler Bunnell Date: Mon, 5 May 2014 03:00:47 +0000 (-0400) Subject: archive/zip: Document ModTime is always UTC X-Git-Tag: go1.3beta2~148 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=be781a72c43cb346d155152ec25cc80790b753fd;p=gostls13.git archive/zip: Document ModTime is always UTC Fixes #7592 LGTM=robert.hencke, adg R=golang-codereviews, robert.hencke, gobot, adg CC=golang-codereviews https://golang.org/cl/90810043 --- diff --git a/src/pkg/archive/zip/struct.go b/src/pkg/archive/zip/struct.go index 65e5238c3b..cb28e83242 100644 --- a/src/pkg/archive/zip/struct.go +++ b/src/pkg/archive/zip/struct.go @@ -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)