Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for timeToMsDosTime (0.19 sec)

  1. src/archive/zip/struct.go

    		int(dosTime>>5&0x3f),
    		int(dosTime&0x1f*2),
    		0, // nanoseconds
    
    		time.UTC,
    	)
    }
    
    // timeToMsDosTime converts a time.Time to an MS-DOS date and time.
    // The resolution is 2s.
    // See: https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-filetimetodosdatetime
    func timeToMsDosTime(t time.Time) (fDate uint16, fTime uint16) {
    	fDate = uint16(t.Day() + int(t.Month())<<5 + (t.Year()-1980)<<9)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 12.1K bytes
    - Viewed (0)
  2. src/archive/zip/writer.go

    		// to the local timezone.
    		//
    		// The timezone is only non-UTC if a user directly sets the Modified
    		// field directly themselves. All other approaches sets UTC.
    		fh.ModifiedDate, fh.ModifiedTime = timeToMsDosTime(fh.Modified)
    
    		// Use "extended timestamp" format since this is what Info-ZIP uses.
    		// Nearly every major ZIP implementation uses a different format,
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 04 14:28:57 GMT 2024
    - 19.3K bytes
    - Viewed (0)
Back to top