Skip to content

Commit

Permalink
fixed #20
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchharvey committed Mar 26, 2018
1 parent 772226d commit 7ee8df0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/mygcc/datacollection/Homework.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ private String dateStringToDate(final String rawDate) {
}
String[] rawParts = rawDate.split(" ");
int pMonth = Arrays.asList(months).indexOf(rawParts[1]) + 1;
String pDay = rawParts[2];
int pDay = Integer.parseInt(rawParts[2]);
int pHour = Integer.parseInt(rawParts[timeindex].split(":")[0]);
int pMinute = Integer.parseInt(rawParts[timeindex].split(":")[1]);
if (rawParts[timeindicatorindex].equals("AM")
Expand All @@ -154,7 +154,7 @@ private String dateStringToDate(final String rawDate) {
if (rawParts[timeindicatorindex].equals("PM")) {
pHour += timedifference;
}
return String.format("%s-%02d-%sT%02d:%02d:00Z",
return String.format("%s-%02d-%02dT%02d:%02d:00Z",
CURRENT_YEAR, pMonth, pDay, pHour, pMinute);
}
}

0 comments on commit 7ee8df0

Please sign in to comment.