Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 2 of 2 for formatPAXTime (0.05 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. src/archive/tar/strconv.go

    		return time.Unix(secs, -1*nsecs), nil // Negative correction
    	}
    	return time.Unix(secs, nsecs), nil
    }
    
    // formatPAXTime converts ts into a time of the form %d.%d as described in the
    // PAX specification. This function is capable of negative timestamps.
    func formatPAXTime(ts time.Time) (s string) {
    	secs, nsecs := ts.Unix(), ts.Nanosecond()
    	if nsecs == 0 {
    		return strconv.FormatInt(secs, 10)
    	}
    
    Created: Tue Dec 30 11:13:12 GMT 2025
    - Last Modified: Mon Sep 08 17:08:20 GMT 2025
    - 9.1K bytes
    - Click Count (0)
  2. src/archive/tar/strconv_test.go

    		{-1350244992, -23960100, "-1350244992.0239601"},
    		{-1350244992, -23960108, "-1350244992.023960108"},
    	}
    
    	for _, v := range vectors {
    		got := formatPAXTime(time.Unix(v.sec, v.nsec))
    		if got != v.want {
    			t.Errorf("formatPAXTime(%ds, %dns): got %q, want %q",
    				v.sec, v.nsec, got, v.want)
    		}
    	}
    }
    
    func TestParsePAXRecord(t *testing.T) {
    	medName := strings.Repeat("CD", 50)
    Created: Tue Dec 30 11:13:12 GMT 2025
    - Last Modified: Thu Sep 11 17:52:43 GMT 2025
    - 15K bytes
    - Click Count (0)
Back to Top