File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ module Data.Thyme.Format.DateFast (
1111import Control.Applicative
1212#endif
1313import Control.Lens (from , view )
14- import Control.Monad (unless , void )
14+ import Control.Monad (unless , when , void )
1515import qualified Data.ByteString as BS
1616import Data.Int (Int64 )
1717import Data.List (foldl1' )
@@ -71,7 +71,9 @@ parseNumber4 = do -- Specialized version for 2 digits
7171toffset :: Scanner Int64
7272toffset = do
7373 hours <- parseNumber2
74- S. char8 ' :'
74+ -- optional ':'
75+ colon <- S. lookAheadChar8
76+ when (colon == Just ' :' ) (S. char8 ' :' )
7577 minutes <- parseNumber2
7678 return $ fromIntegral $ hours * 3600 + minutes * 60
7779{-# INLINE toffset #-}
Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ library
105105 vector-th-unbox >= 0.2.1.0 ,
106106 vector-space >= 0.8 ,
107107 scanner
108+ build-tools : hsc2hs
108109 if os(windows)
109110 build-depends : Win32
110111 if os(darwin) || os(freebsd)
You can’t perform that action at this time.
0 commit comments