Skip to content

Commit

Permalink
Fix for issue #31
Browse files Browse the repository at this point in the history
  • Loading branch information
Morten Haraldsen committed Apr 17, 2024
1 parent b448712 commit 8bf6ab8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
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
}
]

0 comments on commit 8bf6ab8

Please sign in to comment.