diff --git a/Language/Preprocessor/Cpphs/MacroPass.hs b/Language/Preprocessor/Cpphs/MacroPass.hs
--- a/Language/Preprocessor/Cpphs/MacroPass.hs
+++ b/Language/Preprocessor/Cpphs/MacroPass.hs
@@ -29,8 +29,10 @@
 import Language.Preprocessor.Cpphs.Options    (BoolOptions(..))
 import System.IO.Unsafe (unsafeInterleaveIO)
 import Control.Monad    ((=<<))
-import System.Time       (getClockTime, toCalendarTime, formatCalendarTime)
-import System.Locale     (defaultTimeLocale)
+--import System.Time       (getClockTime, toCalendarTime, formatCalendarTime)
+--import System.Locale     (defaultTimeLocale)
+import Data.Time.Clock  (getCurrentTime)
+import Data.Time.Format (formatTime, defaultTimeLocale)
 
 noPos :: Posn
 noPos = newfile "preDefined"
@@ -132,12 +134,16 @@
       "__FILE__" -> emit (show (filename p))$ macroProcess pr layout lang st ws
       "__LINE__" -> emit (show (lineno p))  $ macroProcess pr layout lang st ws
       "__DATE__" -> do w <- return .
-                            formatCalendarTime defaultTimeLocale "\"%d %b %Y\""
-                            =<< toCalendarTime =<< getClockTime
+                         -- formatCalendarTime defaultTimeLocale "\"%d %b %Y\""
+                         -- =<< toCalendarTime =<< getClockTime
+                            formatTime defaultTimeLocale "\"%d %b %Y\""
+                            =<< getCurrentTime
                        emit w $ macroProcess pr layout lang st ws
       "__TIME__" -> do w <- return .
-                            formatCalendarTime defaultTimeLocale "\"%H:%M:%S\""
-                            =<< toCalendarTime =<< getClockTime
+                         -- formatCalendarTime defaultTimeLocale "\"%H:%M:%S\""
+                         -- =<< toCalendarTime =<< getClockTime
+                            formatTime defaultTimeLocale "\"%H:%M:%S\""
+                            =<< getCurrentTime
                        emit w $ macroProcess pr layout lang st ws
       _ ->
         case lookupST x st of
diff --git a/cpphs.cabal b/cpphs.cabal
--- a/cpphs.cabal
+++ b/cpphs.cabal
@@ -1,5 +1,5 @@
 Name: cpphs
-Version: 1.20.8
+Version: 1.20.9
 Copyright: 2004-2017, Malcolm Wallace
 License: LGPL
 License-File: LICENCE-LGPL
@@ -24,7 +24,7 @@
 Extra-Source-Files: README, LICENCE-GPL, LICENCE-commercial, CHANGELOG, docs/cpphs.1, docs/index.html
 
 Library
-    Build-Depends: base>3&&<6, old-locale, old-time, directory, polyparse>=1.9
+    Build-Depends: base>3&&<6, time, directory, polyparse>=1.9
     Exposed-Modules:
         Language.Preprocessor.Cpphs
         Language.Preprocessor.Unlit
@@ -40,7 +40,7 @@
         Language.Preprocessor.Cpphs.Tokenise
 
 Executable cpphs
-    Build-Depends: base>3&&<6, old-locale, old-time, directory, polyparse>=1.9
+    Build-Depends: base>3&&<6, time, directory, polyparse>=1.9
     Main-Is: cpphs.hs
     Other-Modules:
         Language.Preprocessor.Cpphs
diff --git a/cpphs.hs b/cpphs.hs
--- a/cpphs.hs
+++ b/cpphs.hs
@@ -21,7 +21,7 @@
 import Data.List   ( isPrefixOf )
 
 version :: String
-version = "1.20.8"
+version = "1.20.9"
 
 main :: IO ()
 main = do
