Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for SetModTime (0.09 sec)

  1. 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)
  2. 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)
  3. 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)
  4. api/go1.16.txt

    pkg archive/tar, type Header struct, Xattrs //deprecated
    pkg archive/zip, method (*File) ModTime //deprecated
    pkg archive/zip, method (*File) SetModTime //deprecated
    pkg archive/zip, method (*FileHeader) ModTime //deprecated
    pkg archive/zip, method (*FileHeader) SetModTime //deprecated
    pkg archive/zip, type FileHeader struct, CompressedSize //deprecated
    pkg archive/zip, type FileHeader struct, ModifiedDate //deprecated
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Dec 02 16:30:41 UTC 2022
    - 479.2K bytes
    - Viewed (0)
Back to top