Changeset 3816


Ignore:
Timestamp:
03/13/08 17:15:23 (12 years ago)
Author:
melissa
Message:

Set creation date to current time if a creation date is not stored in the MetadataRetrieve.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/ome/OMEWriter.java

    r3587 r3816  
    245245 
    246246        r.setVar("NOW", "now"); 
    247         r.setVar("creationDate", metadata.getImageCreationDate(0)); 
     247 
     248        String creationDate = metadata.getImageCreationDate(0); 
     249        if (creationDate == null) { 
     250          creationDate = 
     251            DataTools.convertDate(System.currentTimeMillis(), DataTools.UNIX); 
     252        } 
     253 
     254        r.setVar("creationDate", creationDate); 
     255 
    248256        if (metadata.getImageName(0) != null) { 
    249257          r.setVar("imageName", metadata.getImageName(0)); 
Note: See TracChangeset for help on using the changeset viewer.