[MDEV-13511] MariaDB no longer accepts ISO 8601 with trailing Z Created: 2017-08-13 Updated: 2017-08-14 Resolved: 2017-08-13 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Time zones |
| Affects Version/s: | 10.2.7 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Peter Sarkozi | Assignee: | Sergei Golubchik |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Description |
|
It works with ADDTIME, but not when inserting.
Inserting with a trailing Z does work in another db that is 10.1.19. What has changed? It's valid ISO8601 as far as I know. |
| Comments |
| Comment by Sergei Golubchik [ 2017-08-13 ] | ||
|
Note "1 warning" after your SELECT ADDTIME statement. If you'd run SHOW WARNINGS (although I, personally, prefer to have
in my ~/.my.cnf) you'd see that 'Z' was ignored as some garbage at the end of the datetime value. 10.1 does exactly the same. In 10.2 the default value of sql_mode includes STRICT_TRANS_TABLES, which turns such a warning into an error. | ||
| Comment by Peter Sarkozi [ 2017-08-14 ] | ||
|
Ok, then why does MariaDB not accept a perfectly valid ISO 8601 date? | ||
| Comment by Sergei Golubchik [ 2017-08-14 ] | ||
|
MariaDB does not yet support the "timestamp with a time zone" data type. It is MDEV-10018. And 'Z' means UTC, so when you add 'Z' to a timestamp, it becomes a timestamp with a time zone. |