[MDEV-11829] Please add support for datetime with time zone literals (ISO6801) Created: 2017-01-18  Updated: 2023-11-30

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Chris Calender (Inactive) Assignee: Alexander Barkov
Resolution: Unresolved Votes: 2
Labels: contribution, foundation

Issue Links:
Blocks
is blocked by MDEV-4912 Data type plugin API version 1 Closed
is blocked by MDEV-10018 Timestamp with time zone Open
is blocked by MDEV-13995 MAX(timestamp) returns a wrong result... Closed
is blocked by MDEV-16806 Add Type_handler::create_literal_item() Closed
is blocked by MDEV-16852 Get rid of Item_temporal_hybrid_func:... Closed
Duplicate
is duplicated by MDEV-18125 JSON_VALUE broken in functions Closed
Relates
relates to MDEV-10575 sql_mode=ORACLE: Date and timestamp f... Open
relates to MDEV-17448 Support DATETIME(6) for ROW START, RO... Open
Epic Link: New data types

 Description   

This is a feature request requesting to please add support for datetime with time zone literals (ISO6801).

A valid value with this format would be:

2016-12-10T10:10:10-05:00

As far as I know, we do support part of ISO6801, which is:

2016-12-10T10:10:10

However, we do not support the trailing time zone literal ("-05:00" in this case).

For reference, this code revision is what mentions the partial support of ISO6801:

At least the following formats are recogniced (based on number of digits)
...
YYYYMMDDTHHMMSS where T is a the character T (ISO8601)

https://github.com/MariaDB/server/blob/bb2c1a52c61706dde8c525a8887f2d364c0db1eb/sql-common/my_time.c#L269

Also, this bug is spawned off of the following bug (which was designated "not a bug", thus I wanted to file a feature request for the future):

https://jira.mariadb.org/browse/MDEV-11576

Thank you for your consideration.



 Comments   
Comment by Daniel Black [ 2017-03-11 ]

ccalender, as indicated the referenced pull request implements the form ...<time>(±hh:mm|Z)

What isn't implemented is the ISO8601 representations of timezone offsets in these forms

  • ...<time>±hhmm
  • ....<time>±hh

Are these important to you? Is it worth doing for completeness sake?

Are the ordinal or week forms of ISO8601 important to you?

Comment by Chris Calender (Inactive) [ 2017-03-16 ]

Hi Daniel,

Yes, the following are important (specifically the first one):

...<time>±hhmm
....<time>±hh

I think that part would be worth doing.

Comment by Shahriyar Imanov [ 2022-12-10 ]

5 years....

Generated at Thu Feb 08 07:52:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.