diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-31 15:07:43 +0000 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-31 15:07:43 +0000 |
| commit | f86101e3282efec94e48561b465b38cdaa28630c (patch) | |
| tree | 513864ec53987e0aec0e2e23e8c755ae25898300 /spec/src/Thermoprint/API.hs | |
| parent | 44a6279b86deecc865f05d2ee519f64f39ac1ccb (diff) | |
| download | thermoprint-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/src/Thermoprint/API.hs')
| -rw-r--r-- | spec/src/Thermoprint/API.hs | 4 |
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 | |||
| 65 | type DraftTitle = Text | 65 | type DraftTitle = Text |
| 66 | 66 | ||
| 67 | instance FromText UTCTime where | 67 | instance FromText UTCTime where |
| 68 | fromText = parseTimeM True defaultTimeLocale "%s%Q" . T.unpack | 68 | fromText = parseTimeM True defaultTimeLocale "%F_%T%Q" . T.unpack |
| 69 | 69 | ||
| 70 | instance ToText UTCTime where | 70 | instance ToText UTCTime where |
| 71 | toText = T.pack . formatTime defaultTimeLocale "%s%Q" | 71 | toText = T.pack . formatTime defaultTimeLocale "%F_%T%Q" |
| 72 | 72 | ||
| 73 | type ThermoprintAPI = "printers" :> Get '[JSON] (Map PrinterId PrinterStatus) | 73 | type ThermoprintAPI = "printers" :> Get '[JSON] (Map PrinterId PrinterStatus) |
| 74 | :<|> "jobs" :> ( | 74 | :<|> "jobs" :> ( |
