mirror of
https://github.com/traccar/traccar.git
synced 2025-01-08 11:47:49 +08:00
Fix scheduled reports
This commit is contained in:
parent
d12403926b
commit
e6c3d52e90
@ -29,6 +29,7 @@ import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.temporal.Temporal;
|
||||
import java.util.Date;
|
||||
@ -87,6 +88,8 @@ public class Calendar extends ExtendedModel {
|
||||
private static Instant temporalToInstant(Temporal temporal) {
|
||||
if (temporal instanceof ZonedDateTime) {
|
||||
return ((ZonedDateTime) temporal).toInstant();
|
||||
} else if (temporal instanceof OffsetDateTime) {
|
||||
return ((OffsetDateTime) temporal).toInstant();
|
||||
} else if (temporal instanceof Instant) {
|
||||
return (Instant) temporal;
|
||||
} else {
|
||||
|
@ -94,7 +94,7 @@ public class TaskReports extends SingleScheduleTask {
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (StorageException e) {
|
||||
} catch (Exception e) {
|
||||
LOGGER.warn("Scheduled reports error", e);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user