Well, therefore, while tracking JDBC code, it seems that the Oracle driver is hard-coded for its own formatting:
int k = (((bytes[0 + j] & 255) - 100) * 100 + (bytes[1 + j] & 255)) - 100; String s = k + "-" + toStr(bytes[2 + j]) + "-" + toStr(bytes[3 + j]) + " " + toStr(bytes[4 + j] - 1) + ":" + toStr(bytes[5 + j] - 1) + ":" + toStr(bytes[6 + j] - 1) + ".0";
So, I assume that:
- This behavior is not specified anywhere in the JDBC specification.
- Each driver library can return any format that it likes.
I guess this is because different implementations return different formats. Of course, it is still possible that this format is specified somewhere in the JDBC specification, and some implementations are inconsistent, but this seems unlikely. I definitely could not find references to this in the JDBC specification (but that does not mean that they are not somewhere).
However, the key point, as far as I know, is that the format is hard-coded in the library and is not overridden by any environments or other settings, but will also not be changed on different systems if the driver library version remains the same.
source share