From f86101e3282efec94e48561b465b38cdaa28630c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 31 Jan 2016 15:07:43 +0000 Subject: "Better" text instances of UTCTime --- spec/src/Thermoprint/API.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/src/Thermoprint/API.hs') diff --git a/spec/src/Thermoprint/API.hs b/spec/src/Thermoprint/API.hs index 4f9d074..b27c0b5 100644 --- a/spec/src/Thermoprint/API.hs +++ b/spec/src/Thermoprint/API.hs @@ -65,10 +65,10 @@ data PrintingError = UnknownError type DraftTitle = Text instance FromText UTCTime where - fromText = parseTimeM True defaultTimeLocale "%s%Q" . T.unpack + fromText = parseTimeM True defaultTimeLocale "%F_%T%Q" . T.unpack instance ToText UTCTime where - toText = T.pack . formatTime defaultTimeLocale "%s%Q" + toText = T.pack . formatTime defaultTimeLocale "%F_%T%Q" type ThermoprintAPI = "printers" :> Get '[JSON] (Map PrinterId PrinterStatus) :<|> "jobs" :> ( -- cgit v1.2.3