
29 Mar
2013
29 Mar
'13
8:03 a.m.
2013/3/28 Brandon Allbery
Because you need to convert it from a foreign representation, which may require arbitrary math depending on the details of that representation. And, while there may not be a strict meaning applied by the standard, there *is* a platform-dependent strict meaning (else times would be useless) *and* the conversion between the FFI and Haskell representations will need to know that platform-dependent meaning so that it can do a meaningful conversion.
Wouldn't it be safer, and more portable, to use either : call ctime, and get a string you can parse call localtime, get back a struct tm which has int members you can work with.