I already posted this bug for SQL Developer versions 4.0.0.13 and 4.01.14, but it is still present in version 4.0.3.16.
Here ist the test scenario:
CREATE TABLE demo (a TIMESTAMP(6) );
INSERT INTO demo a VALUES( TO_TIMESTAMP( '0187-01-31-15.03.16,309113', 'yyyy-mm-dd-hh24.mi.ss,ff6' ) );
INSERT INTO demo a VALUES( TO_TIMESTAMP( '0187-01-31-15.03.17,309113', 'yyyy-mm-dd-hh24.mi.ss,ff6' ) );
SELECT a, TO_CHAR( a, 'yyyy-mm-dd-hh24.mi.ss,ff6' ) FROM demo;
My result is (of course depending on the NLS preferences:
0187-01-31-15.03.17,309113000 | 0187-01-31-15.03.18,309113 |
0187-01-31-15.03.16,309113000 | 0187-01-31-15.03.17,309113 |
As you can see the part containing the "seconds" is not ok. Using the TO_CHAR built-in the result differs from not using the built-in. Looks like not using TO_CHAR brings us correct results.
Using SQL*Plus works fine: the two resulting columns (with and without TO_CHAR) show the same values (the values used in the insert statement)!
This bug does not occur in version 3 of SQL Developer!
Nobody out there who's able to reproduce this problem? (except my co-workers)