diff --git a/Main.hs b/Main.hs
--- a/Main.hs
+++ b/Main.hs
@@ -165,6 +165,7 @@
         replLoop
   where
     toTitle s = (\(f, e) -> map toUpper f ++ e) $ splitAt 1 s
+    rconEval :: BU.ByteString -> Repl IO ()
     rconEval command = do
         repl_state <- lift get
         let time = replTimeout repl_state
diff --git a/darkplaces-rcon-util.cabal b/darkplaces-rcon-util.cabal
--- a/darkplaces-rcon-util.cabal
+++ b/darkplaces-rcon-util.cabal
@@ -1,5 +1,5 @@
 name:                darkplaces-rcon-util
-version:             0.1
+version:             0.1.1
 synopsis:            Darplaces rcon utility
 homepage:            https://github.com/bacher09/darkplaces-rcon
 bug-reports:         https://github.com/bacher09/darkplaces-rcon/issues
@@ -20,6 +20,12 @@
     default:          False
     description:      Build static binary for linux
 
+flag old-locale
+  description: If false then depend on time >= 1.5.
+               .
+               If true then depend on time < 1.5 together with old-locale.
+  default: False
+
 library
   exposed-modules:     DRcon.CommandArgs,
                        DRcon.ConfigFile,
@@ -34,8 +40,6 @@
   build-depends:       base >=4.5 && <5,
                        mtl >=2.0,
                        bytestring >=0.10 && <0.11,
-                       time >=1.4 && <1.6,
-                       old-locale,
                        optparse-applicative >= 0.10 && < 0.12,
                        containers >= 0.5,
                        utf8-string >=0.3,
@@ -47,6 +51,11 @@
                        darkplaces-rcon,
                        text >=1.0,
                        haskeline >= 0.7
+
+  if flag(old-locale)
+    build-depends:     time < 1.5, old-locale
+  else
+    build-depends:     time >= 1.5
 
   ghc-options:         -O2 -funbox-strict-fields -Wall -fno-warn-name-shadowing
   hs-source-dirs:      src
diff --git a/src/DRcon/Polyfills.hs b/src/DRcon/Polyfills.hs
--- a/src/DRcon/Polyfills.hs
+++ b/src/DRcon/Polyfills.hs
@@ -1,7 +1,15 @@
 module DRcon.Polyfills (
     readMaybe,
-    lookupEnv
+    lookupEnv,
+    defaultTimeLocale
 ) where
+
+
+#if MIN_VERSION_time(1,5,0)
+import Data.Time.Format(defaultTimeLocale)
+#else
+import System.Locale (defaultTimeLocale)
+#endif
 
 
 #if MIN_VERSION_base(4,6,0)
diff --git a/src/DRcon/Prompt.hs b/src/DRcon/Prompt.hs
--- a/src/DRcon/Prompt.hs
+++ b/src/DRcon/Prompt.hs
@@ -13,11 +13,11 @@
 import Data.Tuple (swap)
 import Data.Time.LocalTime
 import Control.Monad.Error
-import System.Locale (defaultTimeLocale)
 import Data.Time.Format (formatTime)
 import DarkPlaces.Rcon
 import DRcon.Polyfills (readMaybe)
 import DRcon.Version (versionStr, programName)
+import DRcon.Polyfills (defaultTimeLocale)
 
 
 data FormaterToken a = SimpleText a
