提交 2e51a894 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Allow a space before time zone offset in timestamp literal

上级 01d01c39
......@@ -476,6 +476,9 @@ public class DateTimeUtils {
throw new IllegalArgumentException(
tzName + " (" + tz.getID() + "?)");
}
if (s.charAt(timeZoneStart - 1) == ' ') {
timeZoneStart--;
}
timeEnd = timeZoneStart;
} else {
timeZoneStart = s.indexOf(' ', dateEnd + 1);
......
......@@ -26,3 +26,11 @@ SELECT * FROM tab_with_timezone ORDER BY X;
> 2018-03-25 01:59:00.0+01
> 2018-03-25 03:00:00.0+02
> rows (ordered): 2
SELECT TIMESTAMP WITH TIME ZONE '2000-01-10 00:00:00 -02' AS A,
TIMESTAMP WITH TIME ZONE '2000-01-10 00:00:00.000000000 +02:00' AS B,
TIMESTAMP WITH TIME ZONE '2000-01-10 00:00:00.000000000+02:00' AS C;
> A B C
> ------------------------ ------------------------ ------------------------
> 2000-01-10 00:00:00.0-02 2000-01-10 00:00:00.0+02 2000-01-10 00:00:00.0+02
> rows: 1
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论