diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2019-03-31 20:18:10 +0200 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2019-04-01 14:57:12 +0200 |
commit | 2f9523feb2e108dcb731e08ec467ad06edecdd39 (patch) | |
tree | 2282c4014c5e2dc86ccb808bf2488b6c2e7428a5 /src/CabalHelper | |
parent | 4268ede4f615770c2fb3468da2e1aece99ab8e60 (diff) |
Fix datecode padding in unpackCabalHEAD
Diffstat (limited to 'src/CabalHelper')
-rw-r--r-- | src/CabalHelper/Compiletime/Cabal.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/CabalHelper/Compiletime/Cabal.hs b/src/CabalHelper/Compiletime/Cabal.hs index 3ffb670..69817c7 100644 --- a/src/CabalHelper/Compiletime/Cabal.hs +++ b/src/CabalHelper/Compiletime/Cabal.hs @@ -198,7 +198,8 @@ unpackCabalHEAD tmpdir = do let ut = posixSecondsToUTCTime $ fromInteger (read ts) (y,m,d) = toGregorian $ utctDay ut sec = round $ utctDayTime ut - datecode = read $ show y ++ show m ++ show d ++ printf "%5d\n" sec + datecode = + read $ show y ++ printf "%02d" m ++ printf "%02d" d ++ printf "%05d" sec sec :: Int; datecode :: Int let cabal_file = tmpdir </> "Cabal/Cabal.cabal" cf0 <- readFile cabal_file |