Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isues with parsing #486

Open
sideeffffect opened this issue Nov 24, 2023 · 1 comment
Open

Isues with parsing #486

sideeffffect opened this issue Nov 24, 2023 · 1 comment

Comments

@sideeffffect
Copy link

From zio/zio-schema#579 (comment)

False negatives:

Error parsing time 00:00:00 AM with format HH:mm:ss a: java.time.format.DateTimeParseException: Text '00:00:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 00:00:00 AM with format HH:mm:ss a: java.time.format.DateTimeParseException: Text '00:00:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 01:01:00 AM with format HH:mm:ss a: java.time.format.DateTimeParseException: Text '01:01:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 01:01:00 AM with format HH:mm:ss a: java.time.format.DateTimeParseException: Text '01:01:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 10:00:00 AM with format HH:mm:ss a: java.time.format.DateTimeParseException: Text '10:00:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 12:00:00 PM with format HH:mm:ss a: java.time.format.DateTimeParseException: Text '12:00:00 PM' could not be parsed, unparsed text found at index 9
Error parsing time 12:09:09 PM with format HH:mm:ss a: java.time.format.DateTimeParseException: Text '12:09:09 PM' could not be parsed, unparsed text found at index 9
Error parsing time 12:59:59 PM with format HH:mm:ss a: java.time.format.DateTimeParseException: Text '12:59:59 PM' could not be parsed, unparsed text found at index 9
Error parsing time 13:09:09 PM with format HH:mm:ss a: java.time.format.DateTimeParseException: Text '13:09:09 PM' could not be parsed, unparsed text found at index 9
Error parsing time 20:20:20 PM with format HH:mm:ss a: java.time.format.DateTimeParseException: Text '20:20:20 PM' could not be parsed, unparsed text found at index 9
Error parsing time 22:22:22 PM with format HH:mm:ss a: java.time.format.DateTimeParseException: Text '22:22:22 PM' could not be parsed, unparsed text found at index 9
Error parsing time 23:59:00 PM with format HH:mm:ss a: java.time.format.DateTimeParseException: Text '23:59:00 PM' could not be parsed, unparsed text found at index 9
Error parsing time 23:59:59 PM with format HH:mm:ss a: java.time.format.DateTimeParseException: Text '23:59:59 PM' could not be parsed, unparsed text found at index 9
Error parsing time 24:00:00 AM with format HH:mm:ss a: java.time.format.DateTimeParseException: Text '24:00:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 0:0:0 AM with format H:m:s a: java.time.format.DateTimeParseException: Text '0:0:0 AM' could not be parsed, unparsed text found at index 6
Error parsing time 1:1:1 AM with format H:m:s a: java.time.format.DateTimeParseException: Text '1:1:1 AM' could not be parsed, unparsed text found at index 6
Error parsing time 00:00:00 AM with format H:m:s a: java.time.format.DateTimeParseException: Text '00:00:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 00:00:00 AM with format H:m:s a: java.time.format.DateTimeParseException: Text '00:00:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 01:01:00 AM with format H:m:s a: java.time.format.DateTimeParseException: Text '01:01:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 01:01:00 AM with format H:m:s a: java.time.format.DateTimeParseException: Text '01:01:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 10:00:00 AM with format H:m:s a: java.time.format.DateTimeParseException: Text '10:00:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 12:00:00 PM with format H:m:s a: java.time.format.DateTimeParseException: Text '12:00:00 PM' could not be parsed, unparsed text found at index 9
Error parsing time 12:09:09 PM with format H:m:s a: java.time.format.DateTimeParseException: Text '12:09:09 PM' could not be parsed, unparsed text found at index 9
Error parsing time 12:59:59 PM with format H:m:s a: java.time.format.DateTimeParseException: Text '12:59:59 PM' could not be parsed, unparsed text found at index 9
Error parsing time 13:09:09 PM with format H:m:s a: java.time.format.DateTimeParseException: Text '13:09:09 PM' could not be parsed, unparsed text found at index 9
Error parsing time 20:20:20 PM with format H:m:s a: java.time.format.DateTimeParseException: Text '20:20:20 PM' could not be parsed, unparsed text found at index 9
Error parsing time 22:22:22 PM with format H:m:s a: java.time.format.DateTimeParseException: Text '22:22:22 PM' could not be parsed, unparsed text found at index 9
Error parsing time 23:59:00 PM with format H:m:s a: java.time.format.DateTimeParseException: Text '23:59:00 PM' could not be parsed, unparsed text found at index 9
Error parsing time 23:59:59 PM with format H:m:s a: java.time.format.DateTimeParseException: Text '23:59:59 PM' could not be parsed, unparsed text found at index 9
Error parsing time 0:00:00 AM with format H:m:s a: java.time.format.DateTimeParseException: Text '0:00:00 AM' could not be parsed, unparsed text found at index 8
Error parsing time 1:11:00 AM with format H:m:s a: java.time.format.DateTimeParseException: Text '1:11:00 AM' could not be parsed, unparsed text found at index 8
Error parsing time 24:00:00 AM with format H:m:s a: java.time.format.DateTimeParseException: Text '24:00:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 00:00:00 AM with format hh:mm:ss a: java.time.format.DateTimeParseException: Text '00:00:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 00:00:00 AM with format hh:mm:ss a: java.time.format.DateTimeParseException: Text '00:00:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 01:01:00 AM with format hh:mm:ss a: java.time.format.DateTimeParseException: Text '01:01:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 01:01:00 AM with format hh:mm:ss a: java.time.format.DateTimeParseException: Text '01:01:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 10:00:00 AM with format hh:mm:ss a: java.time.format.DateTimeParseException: Text '10:00:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 12:00:00 PM with format hh:mm:ss a: java.time.format.DateTimeParseException: Text '12:00:00 PM' could not be parsed, unparsed text found at index 9
Error parsing time 12:09:09 PM with format hh:mm:ss a: java.time.format.DateTimeParseException: Text '12:09:09 PM' could not be parsed, unparsed text found at index 9
Error parsing time 12:59:59 PM with format hh:mm:ss a: java.time.format.DateTimeParseException: Text '12:59:59 PM' could not be parsed, unparsed text found at index 9
Error parsing time 0:0:0 AM with format h:m:s a: java.time.format.DateTimeParseException: Text '0:0:0 AM' could not be parsed, unparsed text found at index 6
Error parsing time 1:1:1 AM with format h:m:s a: java.time.format.DateTimeParseException: Text '1:1:1 AM' could not be parsed, unparsed text found at index 6
Error parsing time 00:00:00 AM with format h:m:s a: java.time.format.DateTimeParseException: Text '00:00:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 00:00:00 AM with format h:m:s a: java.time.format.DateTimeParseException: Text '00:00:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 01:01:00 AM with format h:m:s a: java.time.format.DateTimeParseException: Text '01:01:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 01:01:00 AM with format h:m:s a: java.time.format.DateTimeParseException: Text '01:01:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 10:00:00 AM with format h:m:s a: java.time.format.DateTimeParseException: Text '10:00:00 AM' could not be parsed, unparsed text found at index 9
Error parsing time 12:00:00 PM with format h:m:s a: java.time.format.DateTimeParseException: Text '12:00:00 PM' could not be parsed, unparsed text found at index 9
Error parsing time 12:09:09 PM with format h:m:s a: java.time.format.DateTimeParseException: Text '12:09:09 PM' could not be parsed, unparsed text found at index 9
Error parsing time 12:59:59 PM with format h:m:s a: java.time.format.DateTimeParseException: Text '12:59:59 PM' could not be parsed, unparsed text found at index 9
Error parsing time 0:00:00 AM with format h:m:s a: java.time.format.DateTimeParseException: Text '0:00:00 AM' could not be parsed, unparsed text found at index 8
Error parsing time 1:11:00 AM with format h:m:s a: java.time.format.DateTimeParseException: Text '1:11:00 AM' could not be parsed, unparsed text found at index 8
Error parsing time 00:00:00 000000000 AM with format HH:mm:ss SSSSSSSSS a: java.time.format.DateTimeParseException: Text '00:00:00 000000000 AM' could not be parsed, unparsed text found at index 19
Error parsing time 01:01:00 000000001 AM with format HH:mm:ss SSSSSSSSS a: java.time.format.DateTimeParseException: Text '01:01:00 000000001 AM' could not be parsed, unparsed text found at index 19
Error parsing time 13:09:09 100000000 PM with format HH:mm:ss SSSSSSSSS a: java.time.format.DateTimeParseException: Text '13:09:09 100000000 PM' could not be parsed, unparsed text found at index 19
Error parsing time 20:20:20 123456789 PM with format HH:mm:ss SSSSSSSSS a: java.time.format.DateTimeParseException: Text '20:20:20 123456789 PM' could not be parsed, unparsed text found at index 19
Error parsing time 23:59:00 222222222 PM with format HH:mm:ss SSSSSSSSS a: java.time.format.DateTimeParseException: Text '23:59:00 222222222 PM' could not be parsed, unparsed text found at index 19
Error parsing time 24:00:00 000000000 AM with format HH:mm:ss SSSSSSSSS a: java.time.format.DateTimeParseException: Text '24:00:00 000000000 AM' could not be parsed, unparsed text found at index 19

False positives:

Time 60 with format mm should be invalid
Time 90 with format mm should be invalid
Time -1 with format m should be invalid
Time 60 with format m should be invalid
Time 90 with format m should be invalid
Time 0505 with format m should be invalid
Time 123 with format m should be invalid
Time 111 with format m should be invalid
@cquiroz
Copy link
Owner

cquiroz commented Nov 24, 2023

Thanks for the report. I guess the parsers needs some improvements. PRs are welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants