Timezone offset in timestamp/time literal and CAST should follow SQL standard syntax only -----------------------------------------------------------------------------------------
Key: CORE-6429 URL: http://tracker.firebirdsql.org/browse/CORE-6429 Project: Firebird Core Issue Type: Improvement Components: Engine Affects Versions: 4.0 Beta 2 Reporter: Mark Rotteveel Currently the syntax of a timezone offset in a timestamp or time literal is a bit too flexible (allowing [+|-][H]H[:[M]M], so 2, 2:0, 02:00, 2:00 and 02:00 (and variations with +) all are +02:00, and 2:1, 02:1, 2:01, 02:01 (and variations with +), all are +02:01. As this is a new feature, I would prefer that we take a conservative approach and use the more specific and less ambiguous syntax of the SQL standard (in 5.3 <literal>): <time zone interval> ::= <sign> <hours value> <colon> <minutes value> <hours value> ::= <datetime value> <minutes value> ::= <datetime value> <datetime value> ::= <unsigned integer> <sign> ::= <plus sign> | <minus sign> Combined with: 31) Within a <datetime literal>, the <years value> shall contain four digits. The <seconds integer value> and other datetime components, with the exception of <seconds fraction>, shall each contain two digits. In other words, the format should be: {+|-}HH:MM (so, no optional components, always 2 digits for hours and minutes) This means that the of the offsets shown earlier, only +02:00 and +02:01 would be valid -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel