Closed pceimpulsive closed 6 months ago
I derped on this one and mis-understood the substring(int) method in Java, The Joda Library looks fine, i'm closing the issue...
Splunk must be sending an additional character or non-white space character in the input string resulting in Joda throwing the exception~ as such it's a source system issue not the Joda zone parsing~
sorry... have a good day!
Note: I found through digging that the older version of Joda will be the reason for this issue i have reported. As such the issue is simply "My Splunk is using an old version of Joda.. I can see the latest release in last 2023 added the additional logic to support the timezone I was concerned with. I was on the right path, just a version too late :D haha..
My Issue was raised as mentioned at Line 249 of the older release version... https://github.com/JodaOrg/joda-time/commit/0e251d278604252a9986f2338c1cee56a9e052a2
In the unlikely event you still think you've found an issue, please delete the text above and describe the problem as follows:
Key information
TimeZone.getDefault()
: 'Australia/Melbourne'DateTimeZone.getDefault()
: 'GMT+10:00'Problem description
Our Splunk system default timezone is GMT+10:00 A JDBC Driver implement Joda Time and passes this value into the forID Method at https://github.com/JodaOrg/joda-time/blob/main/src/main/java/org/joda/time/DateTimeZone.java#L231
The If Block at the below location resolves to True and the value of idToParse is '10:00' https://github.com/JodaOrg/joda-time/blob/main/src/main/java/org/joda/time/DateTimeZone.java#L249
The next line of code that is valid is the exception on L263 as the output of 'id.substring(3);' has no +/- as the first character.
https://github.com/JodaOrg/joda-time/blob/main/src/main/java/org/joda/time/DateTimeZone.java#L263
To me this isn't a terribly complicated fix to support this string format
Something like the following else if might work?
Test case
~ I am not a Java developer sorry i can't really test this.. here is the error i'm getting with Splunk DBXConnect using a Trino JDBC driver that implements the Joda library.
Error Messaging >>