So, the setup is that I have the time, in seconds, since the epoch and I want to turn this into a date I can actually understand.
How do I do this in Haskell? If it is possible, how would I extract days/hours/minutes out of this new encoding?
So, the setup is that I have the time, in seconds, since the epoch
Share
Data.Time.Clock.POSIX has
posixSecondsToUTCTime(you can convert another numeric type to the input expectedPOSIXTimewithrealToFrac).Data.Time.Calendar has a lot of the things you need to extract day, month, etc from the
Daythat forms a part ofUTCTime, the rest of the package has other useful utilities.Example: