ISO 8061 date not recognised with trailing 'Z' in local installation

I am testing an on-prem Singlestore installation, and when trying to input dates with a trailing ‘Z’, I am getting the following error:

MySQL [test]> select date('2023-04-26T01:23:32.519Z');
ERROR 2363 (HY000): Invalid DATE/TIME in type conversion

Without the ‘Z’, it works:

MySQL [test]> select date('2023-04-26T01:23:32.519');
+---------------------------------+
| date('2023-04-26T01:23:32.519') |
+---------------------------------+
| 2023-04-26                      |
+---------------------------------+
1 row in set (0.026 sec)

However, interestingly the trailing ‘Z’ works fine when using the managed service!

Locally, I am running on kubernetes, with the latest node image (8.0.18)

1 Like

Your bot solved it for me!

The “data_conversion_compatibility_level” had defaulted to 8.0 on my local installation, but was 6.0 on my managed service!

1 Like

Be warned though – the old data conversion compat level was not understanding the Z. It probably truncated the string at the T to get the date.

1 Like