Packmatic.Field.Shared.Timestamp (Packmatic v1.2.0) View Source
The Shared Timestamp field is emitted in both Local and Central File Headers, and is emitted in DOS (FAT) format.
The time and date components are represented as little-endian, 16-bit integers, though they are first built separately
Structure
Size | Content |
---|---|
2 bytes | Hour (5 bits), Minute (6 bits), Second / 2 (5 bits) |
2 bytes | Year Since 1980 (7 bits), Month (4 bits), Day (5 bits) |
Notes
See Erlang/OTP’s zip module: dos_date_time_to_datetime/2
.
If the Timestamp given is prior to midnight, 1 January, 1980, it is also coerced to midnight, 1 January, 1980.
If the Timestamp is on or after midnight, 1 January, 2108, then it can no longer be correctly represented within the limitations of the underlying field, and so is coerced to the previous representatable tick: 23:58, 31 December, 2107.
Link to this section Summary
Link to this section Types
Specs
t() :: %Packmatic.Field.Shared.Timestamp{timestamp: DateTime.t()}