Skip to content
This repository has been archived by the owner on Mar 4, 2021. It is now read-only.

Commit

Permalink
Fix issue with dates and RDSJanitorResourceTracker
Browse files Browse the repository at this point in the history
  • Loading branch information
ebukoski committed Jun 27, 2016
1 parent c3121f0 commit 92297f7
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,18 +264,19 @@ private Resource mapResource(ResultSet rs) throws SQLException {
throw new SQLException(msg);
}
return resource;
}

private String millisToFormattedDate(String millisStr) {
String datetime = null;
try {
long millis = Long.parseLong(millisStr);
AWSResource.DATE_FORMATTER.print(millis);
} catch(NumberFormatException nfe) {
}
return datetime;
}

private String millisToFormattedDate(String millisStr) {
String datetime = null;
try {
long millis = Long.parseLong(millisStr);
datetime = AWSResource.DATE_FORMATTER.print(millis);
} catch(NumberFormatException nfe) {
LOGGER.error(String.format("Error parsing datetime %s when reading from RDS", millisStr));
}
return datetime;
}

@Override
public Resource getResource(String resourceId) {
Validate.notEmpty(resourceId);
Expand Down

0 comments on commit 92297f7

Please sign in to comment.