You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metron.apache.org by justinleet <gi...@git.apache.org> on 2017/07/13 14:52:34 UTC
[GitHub] metron pull request #623: METRON-1003 ParserUtil parses dates incorrect
Github user justinleet commented on a diff in the pull request:
https://github.com/apache/metron/pull/623#discussion_r127239592
--- Diff: metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/utils/ParserUtils.java ---
@@ -55,7 +55,7 @@ public static Long convertToEpoch(String m, String d, String ts,
Date date = new SimpleDateFormat("MMM", Locale.ENGLISH).parse(m);
Calendar cal = Calendar.getInstance();
cal.setTime(date);
- String month = String.valueOf(cal.get(Calendar.MONTH));
+ String month = String.valueOf(cal.get(Calendar.MONTH) + 1);
--- End diff --
While you're in here, could you add a javadoc comment to the method explaining what the expected inputs look like? It's not obvious from looking at the function what the expectations are.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---