Skip to content

Wrong message about invalid time zone in CAST FORMAT #8475

Closed
@aafemt

Description

@aafemt

Value is truncated or missed:

SQL> select cast ('2005-03-16 01:02:03.1234 +01:00' as timestamp with time zone format 'YYYY-MM-DD HH24:MI:SS.FF4 TZR') from rdb$database;

                                                     CAST
=========================================================
Statement failed, SQLSTATE = 22009
Invalid time zone region:
SQL> select cast ('2005-03-16 01:02:03.1234 abcd' as timestamp with time zone format 'YYYY-MM-DD HH24:MI:SS.FF4 TZR') from rdb$database;

                                                     CAST
=========================================================
Statement failed, SQLSTATE = 22009
Invalid time zone region: A

BTW, Oracle and encodeTimeStampTz() are fine with the first value. Perhaps FORMAT also should accept displacement for TZR element.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions