diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+* 0.9.5.1 (2015-05-01)
+- add old-locale Cabal flag to fix build on ghc-7.10
+
 * 0.9.5 (2015-04-20)
 - fix for dnf repoquery
 - create SOURCES/ for tarball
diff --git a/cabal-rpm.cabal b/cabal-rpm.cabal
--- a/cabal-rpm.cabal
+++ b/cabal-rpm.cabal
@@ -1,5 +1,5 @@
 Name:                cabal-rpm
-Version:             0.9.5
+Version:             0.9.5.1
 Synopsis:            RPM packaging tool for Haskell Cabal-based packages
 Description:
     This package provides a RPM packaging tool for Haskell Cabal-based packages.
@@ -27,16 +27,23 @@
   type:     git
   location: https://github.com/juhp/cabal-rpm
 
+Flag old-locale
+  Description:   Use old-locale and time < 1.5
+  Default:       True
+
 Executable cblrpm
     Main-is:            Main.hs
     Build-depends: base < 5,
                    Cabal > 1.10 && < 1.23,
                    directory,
                    filepath,
-                   old-locale,
                    process,
-                   time,
                    unix
+    if flag(old-locale)
+       Build-Depends: old-locale >= 1 && < 1.1,
+                      time >= 1.2 && < 1.5
+    else
+       Build-Depends: time >= 1.5 && < 1.6
     Other-modules:
         Commands.Depends,
         Commands.Diff,
diff --git a/src/Commands/Depends.hs b/src/Commands/Depends.hs
--- a/src/Commands/Depends.hs
+++ b/src/Commands/Depends.hs
@@ -25,7 +25,7 @@
 import Control.Applicative ((<$>))
 import Control.Monad (filterM, unless, void)
 import Data.List (nub, sort, (\\))
-import System.Directory	(removeDirectoryRecursive)
+import System.Directory (removeDirectoryRecursive)
 
 data Depends = Depends | Requires | Missing
 
diff --git a/src/Commands/Spec.hs b/src/Commands/Spec.hs
--- a/src/Commands/Spec.hs
+++ b/src/Commands/Spec.hs
@@ -47,7 +47,11 @@
 
 import System.Directory (doesFileExist, getDirectoryContents)
 import System.IO     (IOMode (..), hClose, hPutStrLn, openFile)
+#if defined(MIN_VERSION_time) && MIN_VERSION_time(1,5,0)
+import Data.Time.Format (defaultTimeLocale)
+#else
 import System.Locale (defaultTimeLocale)
+#endif
 import System.FilePath (dropFileName, takeBaseName, takeDirectory, (</>))
 
 import qualified Paths_cabal_rpm (version)
