Changeset 3562 in josm


Ignore:
Timestamp:
2010-09-25T10:39:16+02:00 (11 years ago)
Author:
bastiK
Message:

fixed #5417 - Failed to parse date

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/ChangesetClosedException.java

    r3083 r3562  
    7575        if (m.matches()) {
    7676            changesetId = Long.parseLong(m.group(1));
    77             // Example: Tue Oct 15 10:00:00 UTC 2009. Always parsed with english locale regardless
     77            // Example: "2010-09-07 14:39:41 UTC". Always parsed with US locale regardless
    7878            // of the current locale in JOSM
    79             DateFormat formatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy",Locale.ENGLISH);
     79            DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z", Locale.US);
    8080            try {
    8181                closedOn = formatter.parse(m.group(2));
  • trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java

    r3255 r3562  
    198198            if (m.matches()) {
    199199                long changesetId = Long.parseLong(m.group(1));
    200                 // Example: Tue Oct 15 10:00:00 UTC 2009. Always parsed with english locale, regardless
     200                // Example: "2010-09-07 14:39:41 UTC". Always parsed with US locale, regardless
    201201                // of the current locale in JOSM
    202                 DateFormat formatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.ENGLISH);
     202                DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z", Locale.US);
    203203                Date closeDate = null;
    204204                try {
     
    249249                +"because it has already been closed on {1}.</html>",
    250250                e.getChangesetId(),
    251                 dateFormat.format(e.getClosedOn())
     251                e.getClosedOn() == null ? "?" : dateFormat.format(e.getClosedOn())
    252252        );
    253253        e.printStackTrace();
Note: See TracChangeset for help on using the changeset viewer.