unix-time 0.4.17 → 0.5.0
raw patch · 4 files changed
+8/−27 lines, 4 filesdep −old-localedep −old-time
Dependencies removed: old-locale, old-time
Files
- ChangeLog.md +5/−0
- Data/UnixTime.hs +1/−3
- Data/UnixTime/Conv.hs +1/−20
- unix-time.cabal +1/−4
ChangeLog.md view
@@ -1,5 +1,10 @@ # ChangeLog for unix-time +## v0.5.0++* Remove deprecated `old-time` dependency by dropping `fromClockTime` and `toClockTime`+ [#68](https://github.com/kazu-yamamoto/unix-time/pull/68)+ ## v0.4.17 * Fix MinGW64 linker error
Data/UnixTime.hs view
@@ -25,9 +25,7 @@ -- * Translating time fromEpochTime,- toEpochTime,- fromClockTime,- toClockTime,+ toEpochTime ) where import Data.UnixTime.Conv
Data/UnixTime/Conv.hs view
@@ -9,9 +9,7 @@ webDateFormat, mailDateFormat, fromEpochTime,- toEpochTime,- fromClockTime,- toClockTime,+ toEpochTime ) where import Control.Applicative@@ -23,7 +21,6 @@ import Foreign.Marshal.Alloc import System.IO.Unsafe (unsafePerformIO) import System.Posix.Types (EpochTime)-import System.Time (ClockTime (..)) -- $setup -- >>> import Data.Function (on)@@ -143,19 +140,3 @@ -- From 'UnixTime' to 'EpochTime' ignoring 'utMicroSeconds'. toEpochTime :: UnixTime -> EpochTime toEpochTime (UnixTime sec _) = sec---- |--- From 'ClockTime' to 'UnixTime'.-fromClockTime :: ClockTime -> UnixTime-fromClockTime (TOD sec psec) = UnixTime sec' usec'- where- sec' = fromIntegral sec- usec' = fromIntegral $ psec `div` 1000000---- |--- From 'UnixTime' to 'ClockTime'.-toClockTime :: UnixTime -> ClockTime-toClockTime (UnixTime sec usec) = TOD sec' psec'- where- sec' = truncate (toRational sec)- psec' = fromIntegral $ usec * 1000000
unix-time.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: unix-time-version: 0.4.17+version: 0.5.0 license: BSD3 license-file: LICENSE maintainer: Kazu Yamamoto <kazu@iij.ad.jp>@@ -47,7 +47,6 @@ build-depends: base >=4.4 && <5, bytestring,- old-time, binary if impl(ghc >=7.8)@@ -74,8 +73,6 @@ build-depends: base, bytestring,- old-locale,- old-time, QuickCheck, template-haskell, time,