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

Blame command: Unparseable date when locale is not US

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.4
    • None
    • None
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment