fix longstanding time bug.

fromEnum on a POSIXTime is wrong, use truncate which get the number of
second as an integral type.