Skip to content

Commit

Permalink
updated formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cameroncaci committed Dec 9, 2023
1 parent 7503bb0 commit e877566
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</parent>
<groupId>com.milmove.trdmlambda</groupId>
<artifactId>trdm-lambda</artifactId>
<version>1.0.0.8</version>
<version>1.0.0.9</version>
<name>trdm java spring interface</name>
<description>Project for deploying a Java TRDM interfacer for TGET data.</description>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.GregorianCalendar;
import java.util.List;
import java.util.Set;
import java.util.TimeZone;

import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
Expand Down Expand Up @@ -106,9 +107,10 @@ private XMLGregorianCalendar getOurLastTGETUpdate(String tableName)
Timestamp lastUpdatedTimestamp = rs.getTimestamp("rds_last_updated");

// Convert our last update pulled from the db into XML Gregorian Calendar
// friendly format
// friendly format ending in "Z" for Zulu. X should auto assume Z
SimpleDateFormat xmlUnfriendlyLastUpdateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSSSS");
SimpleDateFormat xmlFriendlyLastUpdateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
SimpleDateFormat xmlFriendlyLastUpdateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'X'");
xmlFriendlyLastUpdateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));

Date date = xmlUnfriendlyLastUpdateFormat.parse(lastUpdatedTimestamp.toString());
String xmlGregorianCalendarString = xmlFriendlyLastUpdateFormat.format(date);
Expand Down

0 comments on commit e877566

Please sign in to comment.