diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-02-10 23:13:33 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-02-11 14:55:03 -0800 |
commit | 390d5e65b2d66078b2f9b9db142dbe2167ea29a9 (patch) | |
tree | 8d8e7f7d953ac10e183bf9958422ec236a83d9be /src/Text/Pandoc/Readers/RST.hs | |
parent | 3c4a58bad03ef56ae9c82b7e7a6ae027514e2bd6 (diff) | |
download | pandoc-390d5e65b2d66078b2f9b9db142dbe2167ea29a9.tar.gz |
Use getTimestamp instead of getCurrentTime in writers.
Setting SOURCE_DATE_EPOCH will allow reproducible builds.
Partially addresses #7093. This does not suffice to fully enable
reproducible in EPUB, since a unique id is being generated for each
build.
Diffstat (limited to 'src/Text/Pandoc/Readers/RST.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index 0f32d993c..29f81b046 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -28,7 +28,7 @@ import qualified Data.Text as T import Text.Pandoc.Builder (Blocks, Inlines, fromList, setMeta, trimInlines) import qualified Text.Pandoc.Builder as B import Text.Pandoc.Class.PandocMonad (PandocMonad, fetchItem, - readFileFromDirs, getCurrentTime) + readFileFromDirs, getTimestamp) import Text.Pandoc.CSV (CSVOptions (..), defaultCSVOptions, parseCSV) import Text.Pandoc.Definition import Text.Pandoc.Error @@ -685,7 +685,7 @@ directive' = do "replace" -> B.para <$> -- consumed by substKey parseInlineFromText (trim top) "date" -> B.para <$> do -- consumed by substKey - t <- getCurrentTime + t <- getTimestamp let format = case T.unpack (T.strip top) of [] -> "%Y-%m-%d" x -> x |