xp_time_stamp =
(parse_time_stamp, from_time_stamp) `xpWrapMaybe` xpText
where
+ -- | We have to re-pad the time_stamp_format with a leading and
+ -- trailing space; see the documentation of 'time_stamp_format'
+ -- for more information.
from_time_stamp :: UTCTime -> String
from_time_stamp =
- formatTime defaultTimeLocale time_stamp_format
+ formatTime defaultTimeLocale (" " ++ time_stamp_format ++ " ")