Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Data/Thyme/Format.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import Data.Bits
import qualified Data.ByteString.Char8 as S
import Data.Char
import Data.Micro
import Data.Int
import Data.Thyme.Calendar
import Data.Thyme.Calendar.Internal
import Data.Thyme.Calendar.MonthDay
Expand Down Expand Up @@ -358,7 +359,7 @@ timeParser TimeLocale {..} = flip execStateT unixEpoch . go where
-- UTCTime
's' -> do
s <- lift (negative P.decimal)
_tpPOSIXTime .= fromSeconds (s :: Int)
_tpPOSIXTime .= fromSeconds (s :: Int64)
flag IsPOSIXTime .= True
go rspec

Expand Down
4 changes: 3 additions & 1 deletion tests/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Common where
import Prelude
import Control.Applicative
import Control.Lens
import Data.Int
import Data.Thyme
import System.Exit
import Test.QuickCheck
Expand All @@ -15,7 +16,8 @@ exit b = exitWith $ if b then ExitSuccess else ExitFailure 1
------------------------------------------------------------------------

instance Arbitrary Day where
arbitrary = ModifiedJulianDay <$> arbitrary
-- To avoid overflows in Day --> YearMonthDay conversion on 32 bit platforms:
arbitrary = ModifiedJulianDay <$> (fromIntegral :: Int -> Int64) <$> arbitrary

instance Arbitrary DiffTime where
arbitrary = view microDiffTime <$> arbitrary
Expand Down