aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-01-31 15:07:43 +0000
committerGregor Kleen <gkleen@yggdrasil.li>2016-01-31 15:07:43 +0000
commitf86101e3282efec94e48561b465b38cdaa28630c (patch)
tree513864ec53987e0aec0e2e23e8c755ae25898300 /spec
parent44a6279b86deecc865f05d2ee519f64f39ac1ccb (diff)
downloadthermoprint-f86101e3282efec94e48561b465b38cdaa28630c.tar
thermoprint-f86101e3282efec94e48561b465b38cdaa28630c.tar.gz
thermoprint-f86101e3282efec94e48561b465b38cdaa28630c.tar.bz2
thermoprint-f86101e3282efec94e48561b465b38cdaa28630c.tar.xz
thermoprint-f86101e3282efec94e48561b465b38cdaa28630c.zip
"Better" text instances of UTCTime
Diffstat (limited to 'spec')
-rw-r--r--spec/src/Thermoprint/API.hs4
1 files changed, 2 insertions, 2 deletions
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
65type DraftTitle = Text 65type DraftTitle = Text
66 66
67instance FromText UTCTime where 67instance FromText UTCTime where
68 fromText = parseTimeM True defaultTimeLocale "%s%Q" . T.unpack 68 fromText = parseTimeM True defaultTimeLocale "%F_%T%Q" . T.unpack
69 69
70instance ToText UTCTime where 70instance ToText UTCTime where
71 toText = T.pack . formatTime defaultTimeLocale "%s%Q" 71 toText = T.pack . formatTime defaultTimeLocale "%F_%T%Q"
72 72
73type ThermoprintAPI = "printers" :> Get '[JSON] (Map PrinterId PrinterStatus) 73type ThermoprintAPI = "printers" :> Get '[JSON] (Map PrinterId PrinterStatus)
74 :<|> "jobs" :> ( 74 :<|> "jobs" :> (