git.iko.soy/typeable/pandoc
on master help sign in
Remove dependency on old-time.
commitf437827b0cb8158fcad325ef7efd1321524468f1 authorJohn MacFarlane <fiddlosopher@gmail.com> dateSat 28 Jan 2012, 16:04 (15 years ago) parent3a0b3df
4 files changed+6−8
pandoc.cabal−2 src/Text/Pandoc/Writers/Docx.hs+2−2 src/Text/Pandoc/Writers/EPUB.hs+2−2 src/Text/Pandoc/Writers/ODT.hs+2−2
pandoc.cabal−2
@@ -202,7 +202,6 @@ Library
202202 bytestring >= 0.9 && < 1.0,
203203 zip-archive >= 0.1.1.7 && < 0.2,
204204 utf8-string >= 0.3 && < 0.4,
205− old-time >= 1 && < 1.2,
206205 old-locale >= 1 && < 1.1,
207206 time >= 1.2 && < 1.5,
208207 HTTP >= 4000.0.5 && < 4000.3,
@@ -295,7 +294,6 @@ Executable pandoc
295294 bytestring >= 0.9 && < 1.0,
296295 zip-archive >= 0.1.1.7 && < 0.2,
297296 utf8-string >= 0.3 && < 0.4,
298− old-time >= 1 && < 1.2,
299297 old-locale >= 1 && < 1.1,
300298 time >= 1.2 && < 1.5,
301299 HTTP >= 4000.0.5 && < 4000.3,
src/Text/Pandoc/Writers/Docx.hs+2−2
@@ -36,7 +36,7 @@ import Data.ByteString.Lazy.UTF8 ( fromString, toString )
3636import Text.Pandoc.UTF8 as UTF8
3737import System.IO ( stderr )
3838import Codec.Archive.Zip
39−import System.Time
39+import Data.Time.Clock.POSIX
4040import Paths_pandoc ( getDataFileName )
4141import Text.Pandoc.Definition
4242import Text.Pandoc.Generic
@@ -114,7 +114,7 @@ writeDocx mbRefDocx opts doc@(Pandoc (Meta tit auths date) _) = do
114114
115115 (newContents, st) <- runStateT (writeOpenXML opts{writerWrapText = False} doc)
116116 defaultWriterState
117− (TOD epochtime _) <- getClockTime
117+ epochtime <- floor `fmap` getPOSIXTime
118118 let imgs = M.elems $ stImages st
119119 let imgPath ident img = "media/" ++ ident ++
120120 case imageType img of
src/Text/Pandoc/Writers/EPUB.hs+2−2
@@ -36,7 +36,7 @@ import System.FilePath ( (</>), (<.>), takeBaseName, takeExtension )
3636import qualified Data.ByteString.Lazy as B
3737import Data.ByteString.Lazy.UTF8 ( fromString )
3838import Codec.Archive.Zip
39−import System.Time
39+import Data.Time.Clock.POSIX
4040import Text.Pandoc.Shared hiding ( Element )
4141import Text.Pandoc.Definition
4242import Text.Pandoc.Generic
@@ -54,7 +54,7 @@ writeEPUB :: Maybe String -- ^ EPUB stylesheet specified at command line
5454 -> Pandoc -- ^ Document to convert
5555 -> IO B.ByteString
5656writeEPUB mbStylesheet opts doc@(Pandoc meta _) = do
57− (TOD epochtime _) <- getClockTime
57+ epochtime <- floor `fmap` getPOSIXTime
5858 let mkEntry path content = toEntry path epochtime content
5959 let opts' = opts{ writerEmailObfuscation = NoObfuscation
6060 , writerStandalone = True
src/Text/Pandoc/Writers/ODT.hs+2−2
@@ -34,7 +34,7 @@ import System.FilePath ( (</>), takeExtension )
3434import qualified Data.ByteString.Lazy as B
3535import Data.ByteString.Lazy.UTF8 ( fromString )
3636import Codec.Archive.Zip
37−import System.Time
37+import Data.Time.Clock.POSIX
3838import Paths_pandoc ( getDataFileName )
3939import Text.Pandoc.Shared ( WriterOptions(..) )
4040import Text.Pandoc.ImageSize ( readImageSize, sizeInPoints )
@@ -72,7 +72,7 @@ writeODT mbRefOdt opts doc = do
7272 let sourceDir = writerSourceDirectory opts
7373 doc' <- bottomUpM (transformPic sourceDir picEntriesRef) doc
7474 let newContents = writeOpenDocument opts{writerWrapText = False} doc'
75− (TOD epochtime _) <- getClockTime
75+ epochtime <- floor `fmap` getPOSIXTime
7676 let contentEntry = toEntry "content.xml" epochtime $ fromString newContents
7777 picEntries <- readIORef picEntriesRef
7878 let archive = foldr addEntryToArchive refArchive $ contentEntry : picEntries