- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for formatPAXTime (0.21 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 Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Feb 09 05:28:50 UTC 2021 - 14K 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 Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Aug 01 14:28:42 UTC 2023 - 9K bytes - Viewed (0) -
src/archive/tar/common.go
if paxKey == paxNone { whyNoPAX = fmt.Sprintf("PAX cannot encode %s=%v", name, ts) format.mustNotBe(FormatPAX) } else { paxHdrs[paxKey] = formatPAXTime(ts) } } if v, ok := h.PAXRecords[paxKey]; ok && v == formatPAXTime(ts) { paxHdrs[paxKey] = v } } // Check basic fields. var blk block v7 := blk.toV7() ustar := blk.toUSTAR() gnu := blk.toGNU()
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Sep 13 21:03:27 UTC 2024 - 24.5K bytes - Viewed (0)