X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTSN%2FPicklers.hs;h=5e620699bbfdc43e53181511493be47f433349ba;hb=ba6ba316a70eafeff011271ff2a4ac6c615d1f69;hp=09c3a3b1000ac983251108afb5e570bdb40eb8c5;hpb=6eb1c7477c2d4d3cace6d1b865a5efbec21300a7;p=dead%2Fhtsn-import.git diff --git a/src/TSN/Picklers.hs b/src/TSN/Picklers.hs index 09c3a3b..5e62069 100644 --- a/src/TSN/Picklers.hs +++ b/src/TSN/Picklers.hs @@ -270,8 +270,8 @@ xp_datetime = -- -- >>> import Data.Maybe ( fromJust ) -- >>> :{ --- let parse_date :: String -> Maybe UTCTime; --- parse_date = parseTime defaultTimeLocale date_format; +-- let parse_date :: String -> Maybe UTCTime +-- parse_date = parseTime defaultTimeLocale date_format -- :} -- -- >>> let dates = [ "1/" ++ (d : "/1970") | d <- ['1'..'9'] ] @@ -474,9 +474,12 @@ xp_time_stamp :: PU UTCTime 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 ++ " ")