Changeset: eca29d0d38a6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/eca29d0d38a6
Modified Files:
        sql/test/sys-schema/Tests/webExamplesCastFunctionsOperators.sql
        sql/test/sys-schema/Tests/webExamplesCastFunctionsOperators.stable.out
Branch: Oct2020
Log Message:

Reenable test, but with explicitly setting the client's time zone.
I don't agree with the assessment that the result is incorrect.  The
timestamp is converted to the client's local time zone, and that is
entirely appropriate.


diffs (42 lines):

diff --git a/sql/test/sys-schema/Tests/webExamplesCastFunctionsOperators.sql 
b/sql/test/sys-schema/Tests/webExamplesCastFunctionsOperators.sql
--- a/sql/test/sys-schema/Tests/webExamplesCastFunctionsOperators.sql
+++ b/sql/test/sys-schema/Tests/webExamplesCastFunctionsOperators.sql
@@ -1,3 +1,5 @@
+set time zone interval '+01:00' hour to minute;
+
 select cast(123 as varchar(10));
 select convert(123, decimal(10,3));
 
@@ -13,8 +15,8 @@ select cast('17:44:59.123456' as time);
 select cast('2020-07-29 17:44:59' as timestamp);
 select cast('2020-07-29T17:44:59' as timestamp);
 select cast('2020-07-29 17:44:59.123456' as timestamp);
---select cast('17:44:59.321+01:30' as timetz); -- produces wrong TZ +1:00 
instead of +1:30 also it changes to +02:00 when summertime starts so no stable 
output
---select cast('2020-07-29 17:44:59.321+01:30' as timestamptz); -- produces 
wrong TZ +1:00 instead of +1:30 also it changes to +02:00 when summertime 
starts so no stable output
+select cast('17:44:59.321+01:30' as timetz);
+select cast('2020-07-29 17:44:59.321+01:30' as timestamptz);
 select cast('1234' as interval month);
 select cast('86400.123' as interval second);
 
diff --git 
a/sql/test/sys-schema/Tests/webExamplesCastFunctionsOperators.stable.out 
b/sql/test/sys-schema/Tests/webExamplesCastFunctionsOperators.stable.out
--- a/sql/test/sys-schema/Tests/webExamplesCastFunctionsOperators.stable.out
+++ b/sql/test/sys-schema/Tests/webExamplesCastFunctionsOperators.stable.out
@@ -83,6 +83,18 @@ stdout of test 'webExamplesCastFunctions
 % timestamp # type
 % 26 # length
 [ 2020-07-29 17:44:59.123456   ]
+#select cast('17:44:59.321+01:30' as timetz);
+% .%1 # table_name
+% %1 # name
+% timetz # type
+% 21 # length
+[ 17:14:59.321000+01:00        ]
+#select cast('2020-07-29 17:44:59.321+01:30' as timestamptz);
+% .%1 # table_name
+% %1 # name
+% timestamptz # type
+% 32 # length
+[ 2020-07-29 17:14:59.321000+01:00     ]
 #select cast('1234' as interval month);
 % .%1 # table_name
 % %1 # name
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to