Skip to content

Commit

Permalink
0004604: Fixed Postgres date parsing bug (#120)
Browse files Browse the repository at this point in the history
* 0004604: Added blocking transaction monitor and snapshot info to MySQL, SQL Server, Postgres, and Oracle DBs

* 0004604: Fixed NullPointerException and improved accuracy of MonitorTypeBlock

* 0004604: Fixed Postgres date parsing issue
  • Loading branch information
evan-miller-jumpmind committed Nov 11, 2020
1 parent 29251c4 commit c1ec4e3
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -307,7 +307,13 @@ public List<Transaction> getTransactions() {
String adjustedTime;
if (startTime != null) {
int decimalIndex = startTime.indexOf(".");
int timezoneIndex = startTime.length() - 3;
int timezoneIndex = startTime.indexOf("+");
if (timezoneIndex == -1) {
timezoneIndex = startTime.indexOf("Z");
if (timezoneIndex == -1) {
timezoneIndex = startTime.lastIndexOf("-");
}
}
adjustedTime = StringUtils.rightPad(startTime.substring(0, Math.min(decimalIndex + 4, timezoneIndex)), 3, "0")
+ startTime.substring(timezoneIndex);
} else {
Expand Down

0 comments on commit c1ec4e3

Please sign in to comment.