Uploaded image for project: 'Maven SCM'
  1. Maven SCM
  2. SCM-593

Blame command: Unparseable date when locale is not US

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.4
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Windows

      Description

      Same problem as here: http://jira.codehaus.org/browse/SCM-551. Moreover exception message is not correct: org.apache.maven.scm.util.AbstractConsumer, line 120:

      " with Locale " + ( locale == null ? Locale.ENGLISH : locale )

      while we use

      format = new SimpleDateFormat( defaultPattern );

      with default locale.

      Simple fix: on line 97, change

      format = new SimpleDateFormat( defaultPattern );

      to:

      format = new SimpleDateFormat( defaultPattern, Locale.US );

      Stack trace:

      EXECUTING: cmd.exe /X /C "hg blame --user --date --number AbstractSiebelOperations.java"
      [ERROR] skip ParseException: Unparseable date: "Thu Jul 08 11:42:09 2010 +0200" during parsing date Thu Jul 08 11:42:09
      2010 +0200 with pattern EEE MMM dd HH:mm:ss yyyy Z with Locale en
      java.text.ParseException: Unparseable date: "Thu Jul 08 11:42:09 2010 +0200"
      at java.text.DateFormat.parse(DateFormat.java:337)
      at org.apache.maven.scm.util.AbstractConsumer.parseDate(AbstractConsumer.java:112)
      at org.apache.maven.scm.util.AbstractConsumer.parseDate(AbstractConsumer.java:68)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kozerskil Lukasz Kozerski
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: