Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-4348

Add String->TimeZone converter so that time zone can be specified for camel-quartz

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.8.0
    • 2.8.1, 2.9.0
    • camel-core
    • 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

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            davsclaus Claus Ibsen
            rodehav Bengt Rodehav
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment