Fix parsing datetime formats

Create issue
Issue #8 resolved
Richard Warburton created an issue

Bitbucket API uses non-iso standard time formats, eg: "2013-04-05 18:32:07+00:00", "2013-04-10 18:44:01+00:00" where they should be like "2013-04-05T18:32:07+00:00". We should either convince bitbucket to use the standard format or add a format string into our parser.

Comments (6)

  1. Richard Warburton reporter
    • changed status to open

    Its really not fixed cleanly in my PR - it uses a character replacement in strings approach as a temporary solution.

  2. Martijn Verburg

    Formatting Joda DateTime example:

    DateTime dt = new DateTime();
    DateTimeFormatter fmt = DateTimeFormat.forPattern("MMMM, yyyy");
    String str = fmt.print(dt);

    Not sure how to declare and execute Java code in the Scala template though (I don't really want this logic in the PullReview Model)

  3. Richard Warburton reporter

    Well the code would go in the parser, and I'm not talking about formatting, but parsing. I agree neither parsing nor formatting concerns should go in the model. I would just leave this issue alone - I'll fix it at next week's meeting.

  4. Log in to comment