diff --git a/src/main/java/org/opentripplanner/middleware/tripmonitor/jobs/CheckMonitoredTrip.java b/src/main/java/org/opentripplanner/middleware/tripmonitor/jobs/CheckMonitoredTrip.java index 7f2c56dd..80a3fbc5 100644 --- a/src/main/java/org/opentripplanner/middleware/tripmonitor/jobs/CheckMonitoredTrip.java +++ b/src/main/java/org/opentripplanner/middleware/tripmonitor/jobs/CheckMonitoredTrip.java @@ -926,7 +926,9 @@ private boolean updateMonitoredTrip() { return false; } journeyState.matchingItinerary = matchingItinerary; - journeyState.targetDate = targetZonedDateTime.format(DateTimeUtils.DEFAULT_DATE_FORMATTER); + if (targetZonedDateTime != null) { + journeyState.targetDate = targetZonedDateTime.format(DateTimeUtils.DEFAULT_DATE_FORMATTER); + } journeyState.lastCheckedEpochMillis = DateTimeUtils.currentTimeMillis(); // Update notification time if notification successfully sent. if (notificationTimestampMillis != -1) {