projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
e2b0ce0
)
note about how to convert CTime (aka EpochTime) to UTCTime
author
Simon Marlow
<simonmar@microsoft.com>
Fri, 30 Nov 2007 10:16:48 +0000
(10:16 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Fri, 30 Nov 2007 10:16:48 +0000
(10:16 +0000)
Foreign/C/Types.hs
patch
|
blob
|
history
diff --git
a/Foreign/C/Types.hs
b/Foreign/C/Types.hs
index
04a96ab
..
a06a259
100644
(file)
--- a/
Foreign/C/Types.hs
+++ b/
Foreign/C/Types.hs
@@
-186,6
+186,11
@@
INTEGRAL_TYPE(CSigAtomic,tyConCSigAtomic,"CSigAtomic",HTYPE_SIG_ATOMIC_T)
-- | Haskell type representing the C @clock_t@ type.
ARITHMETIC_TYPE(CClock,tyConCClock,"CClock",HTYPE_CLOCK_T)
-- | Haskell type representing the C @time_t@ type.
+--
+-- To convert to a @Data.Time.UTCTime@, use the following formula:
+--
+-- > posixSecondsToUTCTime (fromRational (toRational t) :: POSIXTime)
+--
ARITHMETIC_TYPE(CTime,tyConCTime,"CTime",HTYPE_TIME_T)
-- FIXME: Implement and provide instances for Eq and Storable