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

Allow date offsets and timezones with Simple language

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.18.0
    • camel-core
    • None
    • Unknown

    Description

      Case 1:
      Customer wants us to drop the files with the following naming scheme: prefix-<datetime in UTC>.data. Wouldn't it be nice if we could just say:

      fileName=prefix-$simple{date-with-timezone:now:UTC:yyyyMMddHHmmss}.data
      

      in the producer URI?

      Case 2:
      Customer wants us to clean up files from a destination that are more than 24 hours old. With the File component's new filterFile feature we should be able to say:

      filterFile=${file:modified} < ${date:now-24h}
      

      in the consumer URI and pull them off the disk.

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              yuruki Jyrki Ruuskanen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: