mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-04-05 04:36:11 +00:00
protocol: parsing for UTCTime to stop on "," and ";" (#1532)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user