mptar_timespec

Module: Archive Data Structures

High-resolution timestamp holding Unix epoch seconds and sub-second nanoseconds. More...

#include <minipaxtar.h>

Public Attributes

Name
mptar_int64 sec
Standard Unix timestamp in seconds.
mptar_uint32 nsec
Sub-second precision in nanoseconds.

Detailed Description

struct mptar_timespec;

High-resolution timestamp holding Unix epoch seconds and sub-second nanoseconds.

Note: Negative epoch seconds are supported via mptar_int64, but writing a negative timestamp forces the emission of a PAX extended header because standard USTAR formats cannot natively represent negative time values.

Public Attributes Documentation

variable sec

mptar_int64 sec;

Standard Unix timestamp in seconds.

Note: Supports negative epoch values. Writing a negative timestamp forces the emission of a PAX extended header because standard USTAR headers cannot natively represent negative time values.

variable nsec

mptar_uint32 nsec;

Sub-second precision in nanoseconds.

Note: Must not exceed 999,999,999 when writing, or an error will occur. Attempting to write an invalid nanosecond value triggers a specific error: MPTAR_ERR_NS_CONVERSION_FAILED.


Updated on 2026-07-23 at 20:07:34 +0000