diff --git a/src/main/java/org/kpmp/dao/UploadPackageMetadata.java b/src/main/java/org/kpmp/dao/UploadPackageMetadata.java index 1f532921..afc564f7 100755 --- a/src/main/java/org/kpmp/dao/UploadPackageMetadata.java +++ b/src/main/java/org/kpmp/dao/UploadPackageMetadata.java @@ -64,7 +64,7 @@ public UploadPackageMetadata(UploadPackage uploadPackage) { if (uploadPackage.getExperimentDate() != null) { this.experimentDate = dt.format(uploadPackage.getExperimentDate()); } - this.createdAt = dt.format(uploadPackage.getCreatedAt()); + this.createdAt = dt.format(uploadPackage.getCreatedAt()) + " UTC"; if (uploadPackage.getPackageTypeOther() != null) { this.packageType = uploadPackage.getPackageTypeOther().getPackageType(); } else { diff --git a/src/test/java/org/kpmp/dao/UploadPackageMetadataTest.java b/src/test/java/org/kpmp/dao/UploadPackageMetadataTest.java index e748c207..aa3dff6d 100755 --- a/src/test/java/org/kpmp/dao/UploadPackageMetadataTest.java +++ b/src/test/java/org/kpmp/dao/UploadPackageMetadataTest.java @@ -77,7 +77,7 @@ public void tearDown() throws Exception { @Test public void testConstructor() throws Exception { - assertEquals(dateFormat.format(now), uploadPackageMetadata.getCreatedAt()); + assertEquals(dateFormat.format(now) + " UTC", uploadPackageMetadata.getCreatedAt()); assertEquals(dateFormat.format(now), uploadPackageMetadata.getExperimentDate()); assertEquals("Mars University", uploadPackageMetadata.getInstitution()); assertEquals("uuid-package", uploadPackageMetadata.getId()); @@ -103,7 +103,7 @@ public void testGenerateJSON() throws JsonProcessingException { String date = dateFormat.format(now); String expected = "{\"id\":\"uuid-package\",\"subjectId\":\"42\",\"experimentDate\":\"" + date + "\",\"createdAt\":\"" + date - + "\",\"packageType\":\"Big Data\",\"protocol\":\"The Protocol\",\"submitterFirstName\":\"Mattie\",\"submitterLastName\":\"Dayta\"," + + " UTC\",\"packageType\":\"Big Data\",\"protocol\":\"The Protocol\",\"submitterFirstName\":\"Mattie\",\"submitterLastName\":\"Dayta\"," + "\"institution\":\"Mars University\",\"files\":[{\"path\":\"/package1/filename\",\"size\":12345,\"fileName\":\"filename\",\"description\":\"file description\",\"universalId\":\"uuid-file\"}]}"; assertEquals(expected, actual); }