Merge pull request #5180 from ruke47/master

DefaultBindings for OffsetTime and OffsetDateTime handle negative offsets
This commit is contained in:
Lukas Eder 2016-04-03 19:59:02 +02:00
commit c220fb5037

View File

@ -1486,7 +1486,7 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
return null;
// [#4338] PostgreSQL is more lenient regarding the offset format
if (string.lastIndexOf('+') == string.length() - 3)
if (string.lastIndexOf('+') == string.length() - 3 || string.lastIndexOf('-') == string.length() - 3)
string = string + ":00";
return OffsetTime.parse(string);
@ -1497,7 +1497,7 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
return null;
// [#4338] PostgreSQL is more lenient regarding the offset format
if (string.lastIndexOf('+') == string.length() - 3)
if (string.lastIndexOf('+') == string.length() - 3 || string.lastIndexOf('-') == string.length() - 3)
string = string + ":00";
// [#4338] SQL supports the alternative ISO 8601 date format, where a