Thanks for your reply Claus,

I hadn't noticed the "trigger.XXX" syntax in camel-quartz. I tried the
following syntax:

quartz://groupName/timerName?cron=<cronExpression>&trigger.timeZone=Europe/Stockholm

This seems to work without having to implement a String ->TimeZone
converter. I don't know why but as long as it works I'm happy.

Thanks for your help,

/Bengt

2011/8/15 Claus Ibsen <[email protected]>

> On Mon, Aug 15, 2011 at 8:50 AM, Bengt Rodehav <[email protected]> wrote:
> > I have previously been using the Quartz support in ServiceMix 3.x. In
> those
> > configurations we always specified the time zone as a separate property.
> > Since a while back we've migrated to Camel and thus use camel-quartz for
> > this. We currently use Camel 2.7.1.
> >
> > However, I cannot see an option in camel-quartz to specify the time zone
> for
> > my cron expressions. It seems like a missing feature.
> > camel-quartz seems to use UTC  (not the local time zone) but I'm not 100%
> > sure on this. Anyway, it is very important to being able to specify a
> > timezone for the cron expression.
> >
> > Does anyone know if this is supported?
> >
>
> It seems you set in on the trigger
>
> http://www.quartz-scheduler.org/api/1.8.1/org/quartz/CronTrigger.html#setTimeZone(java.util.TimeZone)
>
> So something like in the uri
>
> quartz:xxxx?trigger.timeZone=yyy
>
> However we may need a String -> TimeZone converter.
>
>
> It also looks as if you can specify it in the cron syntax
> http://forums.terracotta.org/forums/posts/list/5142.page
>
>
> Maybe we should also allow people to set a timezone on the quartz
> component, so it will use that as a default, in case the endpoint has
> not been configured with an explicit timezone?
>
> Fell free to create a JIRA ticket
>
> And as we love contribution, then patches with unit tests is welcome :)
>
>
> > /Bengt
> >
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: [email protected]
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Reply via email to