diff options
| author | John MacFarlane <[email protected]> | 2021-02-10 23:13:33 -0800 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2021-02-10 23:13:33 -0800 |
| commit | de3b22c356fe5da3fdff8f746b3333cfbfce7d34 (patch) | |
| tree | f6ca34c64fb6a481e3b173f471b9ee067f822f13 | |
| parent | 359881d779dec1061d8a2da06317a9770f8806fe (diff) | |
EPUB writer: use SOURCE_DATE_EPOCH for modification date.source_date_epoch
This enables reproducible builds.
| -rw-r--r-- | src/Text/Pandoc/Writers/EPUB.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index e99fa2567..af4f8ef7d 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -191,7 +191,7 @@ getEPUBMetadata opts meta = do let fixDate m = if null (epubDate m) then do - currentTime <- lift P.getCurrentTime + currentTime <- lift P.getSourceDateEpoch return $ m{ epubDate = [ Date{ dateText = showDateTimeISO8601 currentTime , dateEvent = Nothing } ] } @@ -709,7 +709,7 @@ pandocToEPUB version opts doc = do uuid <- case epubIdentifier metadata of (x:_) -> return $ identifierText x -- use first identifier as UUID [] -> throwError $ PandocShouldNeverHappenError "epubIdentifier is null" -- shouldn't happen - currentTime <- lift P.getCurrentTime + currentTime <- lift P.getSourceDateEpoch let contentsData = UTF8.fromStringLazy $ ppTopElement $ unode "package" ! ([("version", case version of |
