Given Oracle Developer Tools for VS Code 21.5.0 and the following SQL:
ALTER SESSION SET nls_timestamp_tz_format = 'yyyy-mm-dd"T"hh24:mi:ss.ff3TZH:TZM';
SELECT current_timestamp FROM dual;
If I execute these with ⌃E, the data grid shows a mangled result:
Note a pair of double quotes where the letter T should be:
Punctuation and quoted text is reproduced in the result.
– Datetime Format Models
If I Save as… JSON the result is also mangled:
[
{
"CURRENT_TIMESTAMP": "2022-09-14\"\"10:48:22.776+10:00"
}
]
sqlplus instead shows the value I expect:
SQL> ALTER SESSION SET nls_timestamp_tz_format = 'yyyy-mm-dd"T"hh24:mi:ss.ff3TZH:TZM';
Session altered.
SQL> SELECT current_timestamp FROM dual;
CURRENT_TIMESTAMP
----------------------------------------
2022-09-14T10:50:11.643+10:00
The mangling seems specific to data transferred as a TIMESTAMP WITH TIME ZONE. I get the correct result executing this SQL to convert it to a VARCHAR2, for example:
SELECT to_char (current_timestamp, 'yyyy-mm-dd"T"hh24:mi:ss.ff3TZH:TZM') FROM dual;