"Lyle Kopnicky" <[EMAIL PROTECTED]> writes: > Thanks, but that doesn't seem to work. I got an answer of -3. I tried it > again a minute later and it was still -3. I tried again a minute later and > it was -1. It's just after 9am here, so I have no idea what to make of > those numbers.
That's most strange. The only difference between what I wrote and what you had before was the way the conversion to Integer was done. > I have settled on this code: > > secondsSinceMidnight :: IO Int > secondsSinceMidnight = do > zonedTime <- getZonedTime > return $ floor $ toRational $ timeOfDayToTime $ localTimeOfDay $ > zonedTimeToLocalTime zonedTime So what happens with do now <- getZonedTime; print $ (fromEnum $ timeOfDayToTime $ localTimeOfDay $ zonedTimeToLocalTime now)`div`fromEnum (secondsToDiffTime 1) where you are? -- Jón Fairbairn [EMAIL PROTECTED] _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
