mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-11-22 10:07:43 +00:00
protocol: parsing for UTCTime to stop on "," and ";" (#1532)
This commit is contained in:
1 parent
3d10c9bf9e
commit
a632eea75b
1 file changed
+1
-1
@@ -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