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

Allow date offsets and timezones with Simple language

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.18.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: