diff options
-rw-r--r-- | lib/Postdelay/TimeSpec.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Postdelay/TimeSpec.hs b/lib/Postdelay/TimeSpec.hs index f84a196..0736e80 100644 --- a/lib/Postdelay/TimeSpec.hs +++ b/lib/Postdelay/TimeSpec.hs | |||
@@ -104,9 +104,8 @@ timeZone = label "Timezone" $ (Left <$> numericTimezone) <|> (Right <$> namedTim | |||
104 | numericTimezone :: StringParser s m => m TimeZone | 104 | numericTimezone :: StringParser s m => m TimeZone |
105 | numericTimezone = review utcOffset <$> (sign <*> ((^+^) <$> hour <*> minute)) <?> "Numeric timezone" | 105 | numericTimezone = review utcOffset <$> (sign <*> ((^+^) <$> hour <*> minute)) <?> "Numeric timezone" |
106 | where | 106 | where |
107 | hour = (% Hour) <$> twoDigit | 107 | hour = (% Hour) <$> boundedNatural True (0 <=..<= 24) |
108 | minute = (% Minute) <$> twoDigit | 108 | minute = (% Minute) <$> boundedNatural True (0 <=..< 60) |
109 | twoDigit = (\n1 n2 -> fromDigit n1 * 10 + fromDigit n2) <$> digitChar <*> digitChar | ||
110 | 109 | ||
111 | namedTimezone :: (StringParser s m, MonadIO m) => m TZ | 110 | namedTimezone :: (StringParser s m, MonadIO m) => m TZ |
112 | namedTimezone = do | 111 | namedTimezone = do |