Skip to content

Commit bcea30f

Browse files
committed
keep precision for posix to utc conversion
1 parent 7febab0 commit bcea30f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BotPlutusInterface/TimeSlot.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ posixTimeRangeToContainedSlotRangeIO
148148
NegInf -> pure NegInf
149149
PosInf -> pure PosInf
150150

151-
-- helper to calulate bound's closure
151+
-- helper to calculate bound's closure
152152
-- if bound is not `NegInf` or `PosInf`, then `Closure` need to be calculated
153153
-- https://github.com/input-output-hk/plutus-apps/blob/e51f57fa99f4cc0942ba6476b0689e43f0948eb3/plutus-ledger/src/Ledger/TimeSlot.hs#L125-L130
154154
getExtClosure ::
@@ -186,7 +186,7 @@ posixTimeToSlot sysStart eraHist pTime = do
186186
toUtc (Ledger.POSIXTime milliseconds) =
187187
posixSecondsToUTCTime
188188
. secondsToNominalDiffTime
189-
$ fromInteger (milliseconds `div` 1000)
189+
$ fromInteger milliseconds / 1000
190190

191191
-- helper functions --
192192

0 commit comments

Comments
 (0)