1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
diff --git a/Database/HDBC/Locale.hs b/Database/HDBC/Locale.hs
index e62b1c1..976a6a9 100644
--- a/Database/HDBC/Locale.hs
+++ b/Database/HDBC/Locale.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
module Database.HDBC.Locale
(
defaultTimeLocale,
@@ -5,7 +6,12 @@ module Database.HDBC.Locale
)
where
+
+#if MIN_VERSION_time(1,5,0)
+import Data.Time.Format (defaultTimeLocale)
+#else
import System.Locale (defaultTimeLocale)
+#endif
-- | As the semantic of System.Locale.iso8601DateFormat has changed with
-- old-locale-1.0.0.2 in a non-compatible way, we now define our own
diff --git a/Database/HDBC/SqlValue.hs b/Database/HDBC/SqlValue.hs
index 9724f81..0e278cd 100644
--- a/Database/HDBC/SqlValue.hs
+++ b/Database/HDBC/SqlValue.hs
@@ -17,7 +17,11 @@ import Data.Char(ord,toUpper)
import Data.Word
import Data.Int
import qualified System.Time as ST
-import Data.Time
+import Data.Time ( Day (ModifiedJulianDay), DiffTime, LocalTime, NominalDiffTime, ParseTime
+ , TimeOfDay, TimeZone, UTCTime, ZonedTime, formatTime, localDay, localTimeOfDay
+ , parseTime, timeOfDayToTime, timeToTimeOfDay, toModifiedJulianDay, utc
+ , utcToZonedTime, zonedTimeToLocalTime, zonedTimeToUTC, zonedTimeZone
+ )
import Data.Time.Clock.POSIX
import Database.HDBC.Locale (defaultTimeLocale, iso8601DateFormat)
import Data.Ratio
|