- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for formatPAXTime (0.1 sec)
-
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)
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Mon Sep 08 17:08:20 UTC 2025 - 15K bytes - Viewed (0) -
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) }
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Mon Sep 08 17:08:20 UTC 2025 - 9.1K bytes - Viewed (0)