Skip to content

Commit a632eea

Browse files
authored
protocol: parsing for UTCTime to stop on "," and ";" (#1532)
1 parent 3d10c9b commit a632eea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Simplex/Messaging/Encoding/String.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ instance StrEncoding SystemTime where
144144

145145
instance StrEncoding UTCTime where
146146
strEncode = B.pack . iso8601Show
147-
strP = maybe (Left "bad UTCTime") Right . iso8601ParseM . B.unpack <$?> A.takeTill (\c -> c == ' ' || c == '\n')
147+
strP = maybe (Left "bad UTCTime") Right . iso8601ParseM . B.unpack <$?> A.takeTill (\c -> c == ' ' || c == '\n' || c == ',' || c == ';')
148148

149149
-- lists encode/parse as comma-separated strings
150150
strEncodeList :: StrEncoding a => [a] -> ByteString

0 commit comments

Comments
 (0)