Skip to content
This repository was archived by the owner on Oct 6, 2023. It is now read-only.

Commit f4d8cdf

Browse files
author
sowerstl
committed
Remove timezone of JSON shape, as DB is not storing as EST and it's causing conversion issues.
1 parent fc3da63 commit f4d8cdf

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/main/java/gov/osti/entity/DOECodeMetadata.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,9 @@ public String label() {
217217
private String fileName = null;
218218

219219
// administrative dates
220-
@JsonFormat (shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "EST")
220+
@JsonFormat (shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
221221
private Date dateRecordAdded;
222-
@JsonFormat (shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "EST")
222+
@JsonFormat (shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
223223
private Date dateRecordUpdated;
224224

225225
// determine whether or not the RELEASE DATE was changed
@@ -615,13 +615,13 @@ public void setWorkflowStatus(Status status) {
615615
*/
616616
public void setReleaseDate(Date date) {
617617
this.releaseDate = date;
618-
// set the fact we have called this method to se the date value
618+
// set the fact we have called this method to set the date value
619619
this.setReleaseDate=true;
620620
}
621621

622622
@Column (name="release_date")
623623
@Temporal(javax.persistence.TemporalType.DATE)
624-
@JsonFormat (shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "EST")
624+
@JsonFormat (shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
625625
public Date getReleaseDate() {
626626
return this.releaseDate;
627627
}

src/main/java/gov/osti/entity/MetadataSnapshot.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ public class MetadataSnapshot implements Serializable {
5353
private String json;
5454
// administrative dates
5555
@Basic (optional = false)
56-
@JsonFormat (shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "EST")
56+
@JsonFormat (shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
5757
@Column (name = "date_record_added", insertable = true, updatable = false)
5858
@Temporal (TemporalType.TIMESTAMP)
5959
private Date dateRecordAdded;
6060
@Basic (optional = false)
61-
@JsonFormat (shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "EST")
61+
@JsonFormat (shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
6262
@Column (name = "date_record_updated", insertable = true, updatable = true)
6363
@Temporal (TemporalType.TIMESTAMP)
6464
private Date dateRecordUpdated;

src/main/java/gov/osti/entity/OstiMetadata.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public void setDoeContractNumbers(String doeContractNumbers) {
257257
/**
258258
* @return the issuanceDate
259259
*/
260-
@JsonFormat (shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "EST")
260+
@JsonFormat (shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
261261
public Date getIssuanceDate() {
262262
return issuanceDate;
263263
}

src/main/java/gov/osti/entity/User.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,16 @@ public User(String email, String password, String apiKey, String confirmationCod
6969
@Basic(optional = false)
7070
@Column(name = "date_record_added", insertable = true, updatable = false)
7171
@Temporal(TemporalType.TIMESTAMP)
72-
@JsonFormat (shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "EST")
72+
@JsonFormat (shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
7373
private Date dateRecordAdded;
7474
@Basic(optional = false)
7575
@Column(name = "date_record_updated", insertable = true, updatable = true)
7676
@Temporal(TemporalType.TIMESTAMP)
77-
@JsonFormat (shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "EST")
77+
@JsonFormat (shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
7878
private Date dateRecordUpdated;
7979
@Column (name = "date_password_changed")
8080
@Temporal (TemporalType.TIMESTAMP)
81-
@JsonFormat (shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "EST")
81+
@JsonFormat (shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
8282
private Date datePasswordChanged;
8383

8484
// count of failed logins

0 commit comments

Comments
 (0)