summaryrefslogtreecommitdiff
path: root/lib/Postdelay/Scan.hs
diff options
context:
space:
mode:
authorGregor Kleen <aethoago@141.li>2017-02-15 23:44:38 +0100
committerGregor Kleen <aethoago@141.li>2017-02-15 23:44:38 +0100
commit6cab5d804dd2f5a5bcaa74ebad2347c9581a06b8 (patch)
treeba65997b88262eedbc2f1f61f5acb3ce2f895747 /lib/Postdelay/Scan.hs
parent0503ba7038a78094363a29408aee4ad6ee4cfb13 (diff)
downloadpostdelay-6cab5d804dd2f5a5bcaa74ebad2347c9581a06b8.tar
postdelay-6cab5d804dd2f5a5bcaa74ebad2347c9581a06b8.tar.gz
postdelay-6cab5d804dd2f5a5bcaa74ebad2347c9581a06b8.tar.bz2
postdelay-6cab5d804dd2f5a5bcaa74ebad2347c9581a06b8.tar.xz
postdelay-6cab5d804dd2f5a5bcaa74ebad2347c9581a06b8.zip
Refined framework
Diffstat (limited to 'lib/Postdelay/Scan.hs')
-rw-r--r--lib/Postdelay/Scan.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Postdelay/Scan.hs b/lib/Postdelay/Scan.hs
index 0a265b4..7f80818 100644
--- a/lib/Postdelay/Scan.hs
+++ b/lib/Postdelay/Scan.hs
@@ -70,7 +70,7 @@ extractDelay (Message headers _) = do
70 guard $ CI.mk field == "X-Timezone" 70 guard $ CI.mk field == "X-Timezone"
71 either throwM return =<< runParserT (spaceConsumer *> lexeme timeZone <* eof) field content 71 either throwM return =<< runParserT (spaceConsumer *> lexeme timeZone <* eof) field content
72 parseDelay :: Field -> m (Endo LocalTime) 72 parseDelay :: Field -> m (Endo LocalTime)
73 parseDelay (OptionalField field content) = either throwM return =<< runParserT (spaceConsumer *> lexeme timeSpec <* eof) field content 73 parseDelay (OptionalField field content) = either throwM return =<< runParserT (spaceConsumer *> timeSpec <* eof) field content
74 74
75localT :: Either TimeZone TZ -> Iso' UTCTime LocalTime 75localT :: Either TimeZone TZ -> Iso' UTCTime LocalTime
76localT (Left tz) = iso (utcToLocalTime tz) (localTimeToUTC tz) 76localT (Left tz) = iso (utcToLocalTime tz) (localTimeToUTC tz)