protocol: parsing for UTCTime to stop on "," and ";" (#1532)

This commit is contained in:
Evgeny
2025-05-04 21:11:06 +01:00
committed by GitHub
parent 3d10c9bf9e
commit a632eea75b

View File

@@ -144,7 +144,7 @@ instance StrEncoding SystemTime where
instance StrEncoding UTCTime where
strEncode = B.pack . iso8601Show
strP = maybe (Left "bad UTCTime") Right . iso8601ParseM . B.unpack <$?> A.takeTill (\c -> c == ' ' || c == '\n')
strP = maybe (Left "bad UTCTime") Right . iso8601ParseM . B.unpack <$?> A.takeTill (\c -> c == ' ' || c == '\n' || c == ',' || c == ';')
-- lists encode/parse as comma-separated strings
strEncodeList :: StrEncoding a => [a] -> ByteString