Skip to content

Commit

Permalink
fix parse date
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroVega committed Feb 5, 2024
1 parent 6f11dc7 commit ca30dfd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -679,9 +679,9 @@ private Object parseFiwareDate(String dateStr) {
*/
private Object parseEsriFieldTypeDate(String millisFromEpocStr) {

DateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
try {
Date date = dateFormatter.parse(Long.parseLong(millisFromEpocStr));
Long epoch = Long.parseLong(millisFromEpocStr);
Date date = new Date(epoch);
return date;
} catch (ParseException e) {
LOGGER.error("[NGSIArcgisAggregator] Unexpected DateTime format: " + millisFromEpocStr);
Expand Down

0 comments on commit ca30dfd

Please sign in to comment.