I have noticed that CronTrigger
still uses java.util.Date
to compute the next execution time.
That component should be considered outdated in favour of the JSR-310 types, in particular with the current implementation of CronTrigger
s it should be possible to generate no more than a LocalDateTime, since 1) CronTriggers do not carry timezone information and 2) normally time triggers are used to schedule actions on a local node.
Of course, the developer can always convert a Date to a LocalDateTime, but it would be nice if Spring provided native support for JSR-310 types natively and a fallback java.util.Date implementation that basically converts the computed LocalDateTime into Date.
I think that the implementation of a cron sequence generator using JSR 310 is simpler, especially because the current one uses Calendar.