Changeset 2511


Ignore:
Timestamp:
03/26/07 08:23:27 (13 years ago)
Author:
melissa
Message:

Always populate the CreationDate field, even if there isn't a valid date stamp
in the file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/in/BaseTiffReader.java

    r2503 r2511  
    551551      try { 
    552552        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); 
    553         Date date = DateFormat.getDateTimeInstance().parse(creationDate); 
     553        SimpleDateFormat parse = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss");  
     554        Date date = parse.parse(creationDate, new ParsePosition(0)); 
    554555        creationDate = sdf.format(date); 
    555556      } 
    556557      catch (Exception e) { 
    557558        if (debug) e.printStackTrace(); 
    558         creationDate = ""; 
     559        creationDate = null; 
    559560      } 
    560561 
Note: See TracChangeset for help on using the changeset viewer.