Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. src/archive/zip/struct.go

    		offset = 0
    	}
    	return time.FixedZone("", int(offset/time.Second))
    }
    
    // msDosTimeToTime converts an MS-DOS date and time into a time.Time.
    // The resolution is 2s.
    // See: https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-dosdatetimetofiletime
    func msDosTimeToTime(dosDate, dosTime uint16) time.Time {
    	return time.Date(
    		// date bits 0-4: day of month; 5-8: month; 9-15: years since 1980
    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/reader.go

    			if len(fieldBuf) < 5 || fieldBuf.uint8()&1 == 0 {
    				continue parseExtras
    			}
    			ts := int64(fieldBuf.uint32()) // ModTime since Unix epoch
    			modified = time.Unix(ts, 0)
    		}
    	}
    
    	msdosModified := msDosTimeToTime(f.ModifiedDate, f.ModifiedTime)
    	f.Modified = msdosModified
    	if !modified.IsZero() {
    		f.Modified = modified.UTC()
    
    		// If legacy MS-DOS timestamps are set, we can use the delta between
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 27.7K bytes
    - Viewed (0)
Back to top