Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-2130

Add EL Function for offsetting a date by a timezone amount including DST

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • trunk
    • 4.2.0
    • None
    • None

    Description

      If a Coordinator has a data dependency, you can use the tzOffset EL Function to get the offset from the dataset timezone to the coordinator timezone (including DST), so that you can pass to your workflow a time in your timezone. We also have a generic dateOffset EL Function that lets you offset a date by a specific amount. For users not using a data dependency who want to take into account a timezone offset (including DST), they cannot use the tzOffset function, and the dateOffset function is not enough.

      We should add a dateTzOffset function that takes an arbitrary date and a timezone that will offset the given date by the given timezone relative to the Oozie processing timezone, including DST.

      In other words, it's like the dateOffset function, but instead of giving it a fixed offset, you gave it the difference between the Oozie processing timezone and the given timezone, at the time of the given date.

      For example:

      ${coord:dateTzOffset("2012-06-13T00:00Z", "America/Los_Angeles")}
      

      would evaluate to "2012-06-12T17:00Z" (-0700 in Summer)
      and

      ${coord:dateTzOffset("2012-12-13T00:00Z", "America/Los_Angeles")}
      

      would evaluate to "2012-12-12T16:00Z" (-0800 in Winter)

      Attachments

        1. OOZIE-2130.patch
          13 kB
          Robert Kanter
        2. OOZIE-2130.patch
          13 kB
          Robert Kanter

        Activity

          People

            rkanter Robert Kanter
            rkanter Robert Kanter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: