Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.8.0
-
None
-
Patch Available
-
Novice
Description
It is possible to specify a time zone for Quartz, however, in order for that to work Camel needs a String to TimeZone type converter since Quartz requires a TimeZone.
Attached is a patch containing a type converter that works. By setting the type converter explicitly on the context like this,
context.getTypeConverterRegistry().addTypeConverter(TimeZone.class, String.class, new String2TimeZoneConverter());
it is possible to create an endpoint URI looking like this:
quartz://groupName/timerName?cron=<cronExpression>&trigger.timeZone=Europe/Stockholm
However, it would be really useful if this type converter could be included in camel-core. This has been discussed on the camel user list:
http://camel.465427.n5.nabble.com/How-to-specify-a-time-zone-for-camel-quartz-td4700077.html