- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for SetModTime (0.07 sec)
-
src/archive/zip/struct.go
func (h *FileHeader) ModTime() time.Time { return msDosTimeToTime(h.ModifiedDate, h.ModifiedTime) } // SetModTime sets the [Modified], [ModifiedTime], and [ModifiedDate] fields // to the given time in UTC. // // Deprecated: Use [Modified] instead. func (h *FileHeader) SetModTime(t time.Time) { t = t.UTC() // Convert to UTC for compatibility h.Modified = t h.ModifiedDate, h.ModifiedTime = timeToMsDosTime(t)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue May 28 21:41:09 UTC 2024 - 12.1K bytes - Viewed (0) -
src/archive/zip/zip_test.go
t.Fatalf("File(%d) = %q, want %q", i, zr.File[i].Name, want) } } } func TestModTime(t *testing.T) { var testTime = time.Date(2009, time.November, 10, 23, 45, 58, 0, time.UTC) fh := new(FileHeader) fh.SetModTime(testTime) outTime := fh.ModTime() if !outTime.Equal(testTime) { t.Errorf("times don't match: got %s, want %s", outTime, testTime) } }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 19.6K bytes - Viewed (0) -
src/archive/zip/writer.go
fh.ReaderVersion = zipVersion20 // If Modified is set, this takes precedence over MS-DOS timestamp fields. if !fh.Modified.IsZero() { // Contrary to the FileHeader.SetModTime method, we intentionally // do not convert to UTC, because we assume the user intends to encode // the date using the specified timezone. A user may want this control
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Sep 23 14:32:33 UTC 2024 - 19.4K bytes - Viewed (0)