aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Class
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-11-02 09:28:03 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-11-02 09:29:34 -0700
commit70eeeca9c7b399158f01c40ab2f6ef58bd76207f (patch)
tree2f11f38e8bdb4eefc043a73a96673916949b9d8c /src/Text/Pandoc/Class
parentb26f950ccaa0a1a973b282a516bd80295536feb2 (diff)
downloadpandoc-70eeeca9c7b399158f01c40ab2f6ef58bd76207f.tar.gz
Docx writer: use getTimestamp for modification times in reference.docx.
This ensures that when `SOURCE_DATE_EPOCH` is set, the modification times of files taken from the reference.docx will be set deterministically, allowing for reproducible builds. Closes #7654.
Diffstat (limited to 'src/Text/Pandoc/Class')
-rw-r--r--src/Text/Pandoc/Class/PandocMonad.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Class/PandocMonad.hs b/src/Text/Pandoc/Class/PandocMonad.hs
index d3cf1201c..c15ce6444 100644
--- a/src/Text/Pandoc/Class/PandocMonad.hs
+++ b/src/Text/Pandoc/Class/PandocMonad.hs
@@ -454,7 +454,7 @@ getDefaultReferenceDocx = do
"word/theme/theme1.xml"]
let toLazy = BL.fromChunks . (:[])
let pathToEntry path = do
- epochtime <- floor . utcTimeToPOSIXSeconds <$> getCurrentTime
+ epochtime <- floor . utcTimeToPOSIXSeconds <$> getTimestamp
contents <- toLazy <$> readDataFile ("docx/" ++ path)
return $ toEntry path epochtime contents
datadir <- getUserDataDir