From f437827b0cb8158fcad325ef7efd1321524468f1 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 28 Jan 2012 16:04:35 -0800 Subject: Remove dependency on old-time. --- src/Text/Pandoc/Writers/Docx.hs | 4 ++-- src/Text/Pandoc/Writers/EPUB.hs | 4 ++-- src/Text/Pandoc/Writers/ODT.hs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index 218a6e42a..f29a0fe42 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -36,7 +36,7 @@ import Data.ByteString.Lazy.UTF8 ( fromString, toString ) import Text.Pandoc.UTF8 as UTF8 import System.IO ( stderr ) import Codec.Archive.Zip -import System.Time +import Data.Time.Clock.POSIX import Paths_pandoc ( getDataFileName ) import Text.Pandoc.Definition import Text.Pandoc.Generic @@ -114,7 +114,7 @@ writeDocx mbRefDocx opts doc@(Pandoc (Meta tit auths date) _) = do (newContents, st) <- runStateT (writeOpenXML opts{writerWrapText = False} doc) defaultWriterState - (TOD epochtime _) <- getClockTime + epochtime <- floor `fmap` getPOSIXTime let imgs = M.elems $ stImages st let imgPath ident img = "media/" ++ ident ++ case imageType img of diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index e78e79bb5..d509c6842 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -36,7 +36,7 @@ import System.FilePath ( (), (<.>), takeBaseName, takeExtension ) import qualified Data.ByteString.Lazy as B import Data.ByteString.Lazy.UTF8 ( fromString ) import Codec.Archive.Zip -import System.Time +import Data.Time.Clock.POSIX import Text.Pandoc.Shared hiding ( Element ) import Text.Pandoc.Definition import Text.Pandoc.Generic @@ -54,7 +54,7 @@ writeEPUB :: Maybe String -- ^ EPUB stylesheet specified at command line -> Pandoc -- ^ Document to convert -> IO B.ByteString writeEPUB mbStylesheet opts doc@(Pandoc meta _) = do - (TOD epochtime _) <- getClockTime + epochtime <- floor `fmap` getPOSIXTime let mkEntry path content = toEntry path epochtime content let opts' = opts{ writerEmailObfuscation = NoObfuscation , writerStandalone = True diff --git a/src/Text/Pandoc/Writers/ODT.hs b/src/Text/Pandoc/Writers/ODT.hs index 5c6f22ec6..f8f22494f 100644 --- a/src/Text/Pandoc/Writers/ODT.hs +++ b/src/Text/Pandoc/Writers/ODT.hs @@ -34,7 +34,7 @@ import System.FilePath ( (), takeExtension ) import qualified Data.ByteString.Lazy as B import Data.ByteString.Lazy.UTF8 ( fromString ) import Codec.Archive.Zip -import System.Time +import Data.Time.Clock.POSIX import Paths_pandoc ( getDataFileName ) import Text.Pandoc.Shared ( WriterOptions(..) ) import Text.Pandoc.ImageSize ( readImageSize, sizeInPoints ) @@ -72,7 +72,7 @@ writeODT mbRefOdt opts doc = do let sourceDir = writerSourceDirectory opts doc' <- bottomUpM (transformPic sourceDir picEntriesRef) doc let newContents = writeOpenDocument opts{writerWrapText = False} doc' - (TOD epochtime _) <- getClockTime + epochtime <- floor `fmap` getPOSIXTime let contentEntry = toEntry "content.xml" epochtime $ fromString newContents picEntries <- readIORef picEntriesRef let archive = foldr addEntryToArchive refArchive $ contentEntry : picEntries -- cgit v1.2.3