[commit: packages/time] master: document how to get a POSIXTime from an EpochTime or CTime. (2869c91)
git at git.haskell.org
git at git.haskell.org
Fri Jan 23 22:58:49 UTC 2015
Repository : ssh://git@git.haskell.org/time
On branch : master
Link : http://git.haskell.org/packages/time.git/commitdiff/2869c91e34012c0dc1834db50c79b5e68d4b95f2
>---------------------------------------------------------------
commit 2869c91e34012c0dc1834db50c79b5e68d4b95f2
Author: Simon Marlow <simonmar at microsoft.com>
Date: Wed Dec 5 01:15:37 2007 -0800
document how to get a POSIXTime from an EpochTime or CTime.
darcs-hash:20071205091537-760e2-5c6cf6c587c9f72fe962cedd4a33b764a627016d
>---------------------------------------------------------------
2869c91e34012c0dc1834db50c79b5e68d4b95f2
Data/Time/Clock/POSIX.hs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Data/Time/Clock/POSIX.hs b/Data/Time/Clock/POSIX.hs
index b877bf7..84137c1 100644
--- a/Data/Time/Clock/POSIX.hs
+++ b/Data/Time/Clock/POSIX.hs
@@ -24,6 +24,9 @@ posixDayLength :: NominalDiffTime
posixDayLength = 86400
-- | POSIX time is the nominal time since 1970-01-01 00:00 UTC
+--
+-- To convert from a 'Foreign.C.CTime' or 'System.Posix.EpochTime', use 'realToFrac'.
+--
type POSIXTime = NominalDiffTime
unixEpochDay :: Day
More information about the ghc-commits
mailing list