aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sisudoc/outputs/io_out/odt.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sisudoc/outputs/io_out/odt.d')
-rw-r--r--src/sisudoc/outputs/io_out/odt.d15
1 files changed, 11 insertions, 4 deletions
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"┃<?xml version="1.0" encoding="UTF-8"?>
<office:document-meta xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:xl="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:grddl="http://www.w3.org/2003/g/data-view#" office:version="1.2">
<office:meta>
<meta:generator>%s</meta:generator>
<meta:creation-date>%s</meta:creation-date>
<dc:date>%s</dc:date>
- <dc:language>en-US</dc:language>
+ <dc:language>%s</dc:language>
</office:meta>
</office:document-meta>
┃",
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;
}