Hello,
I need to work with timestamp adding/subtracting given number of seconds from it. I chose time
library and its UTFTime
type to represent a timestamp. Now say I want to add 10 seconds to now
. So far I came up with this:
now :: UTCTime
seconds = 10 :: Int
addUTCTime (secondsToNominalDiffTime seconds) now
This does not work becase seconds
is Int but secondsToNominalDiffTime
expects value of type Pico
. (doclink)
I have no idea how to create value of pico type. I feel like I am missing something basic. Can you guys point me in a right direction?
Thanks!