Uploaded image for project: 'JOC - JobScheduler Operations Center'
  1. JOC - JobScheduler Operations Center
  2. JOC-1307

Add time zone support to Notifications

    XMLWordPrintable

Details

    Description

      Current Situation

      • The JS7 stores dates in UTC in its database.
      • The JOC Cockpit daemon/service is operated in the UTC time zone.
      • When notifications are sent, for example by mail in case of job errors, then dates are accordingly stated in UTC.

      Desired Behavior

      • Users wish to receive notifications with dates in their desired time zone.
      • The configuration of notifications should allow to specify the time zone
        • at Message element level: the time zone is used for any occurrence of the message
        • at NotificationMonitors level: the time zone is used specifically for notifications configured with this element

      Maintainer Note

      • Time zone configuration.
        • Introduction of a new attribute time_zone for the following configuration elements:
          1. Fragments/MessageFragments@time_zone
            • Default: Etc/UTC
            • Scope: the time zone is used for all notifications.
          2. Fragments/MessageFragments/Message@time_zone
            • Scope: overrides 1. configuration for any occurrence of the specific message.
          3. Notifications/Notification/NotificationMonitors/<CommandFragmentRef|MailFragmentRef|JMSFragmentRef|NSCAFragmentRef>@time_zone
            • Scope: overrides 1. and 2. configurations for the specific monitor.
      • Date formatting.
        • Using time zone offsets.
          • Examples:
            • 2022-07-05T12:00:00+0000
            • 2022-07-05T10:00:00-0200
            • 2022-07-05T14:00:00+0200
      • Time zone variable.

      Workaround for Command elements

      • If a Command element is used, for example to write notifications to a file or to forward to a system monitor then for operating systems with GNU Date the following command can be used to convert the UTC time of a monitor variable:
      • MON_O_START_TIME=$(env TZ='Asia/Tokyo' date --date="${MON_O_START_TIME}Z")

      Attachments

        Issue Links

          Activity

            People

              ztsa0019 Sourabh Agrawal
              ap Andreas PĆ¼schel
              Aditya Jain Aditya Jain
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: