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 (
11
11
import Control.Applicative
12
12
#endif
13
13
import Control.Lens (from , view )
14
- import Control.Monad (unless , void )
14
+ import Control.Monad (unless , when , void )
15
15
import qualified Data.ByteString as BS
16
16
import Data.Int (Int64 )
17
17
import Data.List (foldl1' )
@@ -71,7 +71,9 @@ parseNumber4 = do -- Specialized version for 2 digits
71
71
toffset :: Scanner Int64
72
72
toffset = do
73
73
hours <- parseNumber2
74
- S. char8 ' :'
74
+ -- optional ':'
75
+ colon <- S. lookAheadChar8
76
+ when (colon == Just ' :' ) (S. char8 ' :' )
75
77
minutes <- parseNumber2
76
78
return $ fromIntegral $ hours * 3600 + minutes * 60
77
79
{-# INLINE toffset #-}
Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ library
105
105
vector-th-unbox >= 0.2.1.0 ,
106
106
vector-space >= 0.8 ,
107
107
scanner
108
+ build-tools : hsc2hs
108
109
if os(windows)
109
110
build-depends : Win32
110
111
if os(darwin) || os(freebsd)
You can’t perform that action at this time.
0 commit comments