From: sof Date: Tue, 3 Jun 1997 22:23:46 +0000 (+0000) Subject: [project @ 1997-06-03 22:23:46 by sof] X-Git-Tag: Approximately_1000_patches_recorded~440 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=f21b0337512aaf9e2a36c16a9cbb301a4faa4e09;p=ghc-hetmet.git [project @ 1997-06-03 22:23:46 by sof] Calls to toClockSec now takes an extra DST flag --- diff --git a/ghc/lib/required/Time.lhs b/ghc/lib/required/Time.lhs index 266fad5..0af39f7 100644 --- a/ghc/lib/required/Time.lhs +++ b/ghc/lib/required/Time.lhs @@ -190,7 +190,7 @@ addToClockTime :: TimeDiff -> ClockTime -> ClockTime addToClockTime (TimeDiff year mon day hour min sec psec) (TOD c_sec c_psec) = unsafePerformPrimIO $ allocWords (``sizeof(time_t)'') >>= \ res -> - _ccall_ toClockSec year mon day hour min sec 1 res + _ccall_ toClockSec year mon day hour min sec 0 res >>= \ ptr@(A# ptr#) -> if ptr /= ``NULL'' then let @@ -282,13 +282,15 @@ toClockTime (CalendarTime year mon mday hour min sec psec wday yday tzname tz is else unsafePerformPrimIO ( allocWords (``sizeof(time_t)'') >>= \ res -> - _ccall_ toClockSec year mon mday hour min sec tz res + _ccall_ toClockSec year mon mday hour min sec isDst res >>= \ ptr@(A# ptr#) -> if ptr /= ``NULL'' then returnPrimIO (TOD (int2Integer# (indexIntOffAddr# ptr# 0#)) psec) else error "Time.toClockTime: can't perform conversion" ) + where + isDst = if isdst then (1::Int) else 0 bottom :: (Int,Int) bottom = error "Time.bottom"