diff --git a/importPicture/test/osm/jp/gpx/ElementMapTRKPTTest.java b/importPicture/test/osm/jp/gpx/ElementMapTRKPTTest.java index 982a020..90d4a1f 100644 --- a/importPicture/test/osm/jp/gpx/ElementMapTRKPTTest.java +++ b/importPicture/test/osm/jp/gpx/ElementMapTRKPTTest.java @@ -4,6 +4,7 @@ import static org.hamcrest.CoreMatchers.nullValue; import static org.junit.Assert.*; +import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; @@ -226,4 +227,17 @@ assertThat(ret, is(nullValue())); } } + + public static class タイムスタンプの書式 { + @Test + public void EXIF時刻書式テスト() throws Exception { + String dateTimeOriginal = "2017:06:30 09:59:59"; + Date time = ImportPicture.toEXIFDate(dateTimeOriginal); + assertThat(ImportPicture.toEXIFString(time), is("2017:06:30 09:59:59")); + assertThat(ImportPicture.toUTCString(time), is("2017-06-30T09:59:59Z")); + DateFormat dfUTC = new SimpleDateFormat(ImportPicture.TIME_FORMAT_STRING); + assertThat(dfUTC.format(time), is("2017-06-30T18:59:59Z")); + } + + } } diff --git a/importPicture/test/osm/jp/gpx/ImportPictureTest.java b/importPicture/test/osm/jp/gpx/ImportPictureTest.java index 7f9bb42..a2181fc 100644 --- a/importPicture/test/osm/jp/gpx/ImportPictureTest.java +++ b/importPicture/test/osm/jp/gpx/ImportPictureTest.java @@ -602,7 +602,7 @@ } } } - + static void setup(Fixture dataset) throws IOException { System.out.println(dataset.toString());