From 515c44399843c62336a0102e933f9fbd7289743d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 21 Sep 2026 00:25:19 -0400 Subject: odt: office:meta from the document, not the run Three faults in four lines of the odt metadata. meta:creation-date and dc:date were taken from generated_time, the run's own clock, so two runs over unchanged markup produced different odt bytes. They now carry the document's own instant, so an odt is a function of its source. That was the last clock stamp in any writer: every output format is now reproducible. generated_time is a human-readable run stamp, of the form "2026-9-17 [38/3] 18:39:35", with unpadded numbers and an iso week in brackets. It is not a valid xsd:dateTime, which is what ODF asks for in both of those fields, so what was written there was malformed as well as unstable. dc:language now carries the document's own language tag. The instant is doc_matters.modified_utc, moved there from epub3.d in this commit: epub3 needs the same value for its dcterms:modified, and one definition cannot drift from the other. generated_time now has no caller and is left in place. (assisted by Claude-Code) --- src/sisudoc/outputs/io_out/odt.d | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/sisudoc/outputs/io_out/odt.d') diff --git a/src/sisudoc/outputs/io_out/odt.d b/src/sisudoc/outputs/io_out/odt.d index 711be50..40d760d 100644 --- a/src/sisudoc/outputs/io_out/odt.d +++ b/src/sisudoc/outputs/io_out/odt.d @@ -959,20 +959,27 @@ template outputODT() { string meta_xml(M)( auto ref M doc_matters, ) { - /+ (meta_xml includes output time-stamp) +/ + /+ ↓ office:meta carries the document's own date and language, not the run's + time-stamp. Both dates were taken from doc_matters.generated_time, which + is a human-readable run stamp ("2026-9-17 [38/3] 18:39:35") and not a + valid xsd:dateTime, which is what ODF asks for here; so the field was + malformed and different on every run. dc:language was a hard-coded + "en-US". + +/ string _meta_xml = format(q"┃ %s %s %s - en-US + %s ┃", doc_matters.generator_program.name_and_version, - doc_matters.generated_time, - doc_matters.generated_time, + doc_matters.modified_utc, + doc_matters.modified_utc, + doc_matters.src.language_tag, ); return _meta_xml; } -- cgit v1.2.3