I'm trying to learn IHP by following the guide. And what I've noticed, that there aren't any functions and other stuff to deal with dates.
For example:
I wanted to change a date of a post to 'NOW()' when updating it
action UpdatePostAction { postId } = do
post <- fetch postId
post
|> buildPost
|> validateIsUnique #title
>>= ifValid \case
Left post -> render EditView { .. }
Right post -> do
post <- post
|> set #created_at '...' -- change '...' to something :)
|> updateRecord
let t = get #title post
setSuccessMessage $ "Post \'" <> t <> "\' updated"
redirectTo PostsAction
So that is the question: What i can do with this 'set-statement' to actually change the date ? Or is there any 'already-specified' functions to do it ?