Skip to content

feat: Write WARC-Date with up to nanosecond precision#83

Merged
maeb merged 5 commits intomasterfrom
feat/warc-date-precision
Mar 31, 2025
Merged

feat: Write WARC-Date with up to nanosecond precision#83
maeb merged 5 commits intomasterfrom
feat/warc-date-precision

Conversation

@maeb
Copy link
Copy Markdown
Member

@maeb maeb commented Mar 31, 2025

No description provided.

maeb added 5 commits March 30, 2025 13:43
This commit increases the precision of the WARC-Date field for WARC 1.1
records up to 9 decimal fractions of a second (nanosecond) . In practice the
clock resolution of unix systems is ~1ms and ~0.5ms for windows systems.

WARC 1.0 records will be written with second precision as was the case for
all records written with this library until now.

The WARC 1.1 specification says the WARC-Date field may be specified in any
levels of granularity according to the [W3CDTF]. It also says WARC-Date
should be specified with as much precision as is accurately known.

See https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/#warc-date-mandatory
See https://www.w3.org/TR/NOTE-datetime
See https://pkg.go.dev/time#hdr-Timer_Resolution
@maeb maeb merged commit a902fcb into master Mar 31, 2025
2 checks passed
@maeb maeb deleted the feat/warc-date-precision branch March 31, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant