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

Fix for issue #31 #32

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/com/ethlo/time/internal/fixed/ITUParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ private static TimezoneOffset parseTimezone(int offset, final ParseConfig parseC
}
}

assertNoMoreChars(offset, parseConfig, chars, idx + 6);
assertNoMoreChars(offset, parseConfig, chars, idx + 5);
return TimezoneOffset.ofHoursMinutes(hours, minutes);
}

Expand Down
8 changes: 7 additions & 1 deletion src/test/resources/test-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@
},
{
"input": "2020-12-31T00:00:00-05:00 x",
"error": "Trailing junk data after position 27: 2020-12-31T00:00:00-05:00 x",
"error": "Trailing junk data after position 26: 2020-12-31T00:00:00-05:00 x",
"error_index": 25,
"lenient": true
},
{
Expand Down Expand Up @@ -331,5 +332,10 @@
"input": "4444-04-23t44:44:60",
"error": "Invalid value for SecondOfMinute (valid values 0 - 59): 60",
"lenient": true
},
{
"input": "1963-06-19T08:30:06.28123+01:00Z",
"error": "Trailing junk data after position 32: 1963-06-19T08:30:06.28123+01:00Z",
"error_index": 31
}
]
Loading