Ignore:
Timestamp:
2016-01-17T13:10:38+01:00 (3 years ago)
Author:
simon04
Message:

fix #11685 - Use sub-second exif/xmp data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java

    r9394 r9499  
    88import java.text.DecimalFormat;
    99import java.text.ParseException;
     10import java.text.SimpleDateFormat;
    1011import java.util.Calendar;
    1112import java.util.Date;
     
    4748
    4849    /**
     50     * Tests reading sub-seconds from the EXIF header
     51     * @throws ParseException  if {@link ExifReader#readTime} fails to parse date/time of sample file
     52     */
     53    @Test
     54    public void testReadTimeSubSecond1() throws ParseException {
     55        Date date = ExifReader.readTime(new File("data_nodist/IMG_20150711_193419.jpg"));
     56        String dateStr = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS").format(date);
     57        assertEquals("2015-07-11T19:34:19.100", dateStr);
     58    }
     59
     60    /**
    4961     * Test orientation extraction
    5062     */
Note: See TracChangeset for help on using the changeset viewer.