aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorstuebinm2022-12-03 12:13:24 +0100
committerstuebinm2022-12-03 12:13:24 +0100
commit2cc78ad6afd731923229f590549ed0619c5f60e9 (patch)
tree42217c0496b176e110266e71edb5ebfd503ee0e2 /lib
parentfdbc4d69b9e41ecf283428a9fb0f1fad015c5187 (diff)
always display seconds
(this is a hack to make the gtfs rt valid)
Diffstat (limited to 'lib')
-rw-r--r--lib/GTFS.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/GTFS.hs b/lib/GTFS.hs
index 8ff87db..3935caa 100644
--- a/lib/GTFS.hs
+++ b/lib/GTFS.hs
@@ -147,8 +147,8 @@ instance Show Time where
show (Time seconds _ _) = ""
+|pad (seconds `div` 3600)|+":"
+|pad ((seconds `mod` 3600) `div` 60)|+
- if seconds `mod` 60 /= 0 then ":"+|pad (seconds `mod` 60)|+""
- else ""
+ {- if seconds `mod` 60 /= 0 then -}":"+|pad (seconds `mod` 60)|+""
+ -- else ""
where
pad num =
if length str < 2 then "0"<>str else str