Details
-
Feature
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
2.0.0
-
None
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:
- Fragments/MessageFragments@time_zone
- Default: Etc/UTC
- Scope: the time zone is used for all notifications.
- Fragments/MessageFragments/Message@time_zone
- Scope: overrides 1. configuration for any occurrence of the specific message.
- Notifications/Notification/NotificationMonitors/<CommandFragmentRef|MailFragmentRef|JMSFragmentRef|NSCAFragmentRef>@time_zone
- Scope: overrides 1. and 2. configurations for the specific monitor.
- Fragments/MessageFragments@time_zone
- Introduction of a new attribute time_zone for the following configuration elements:
- 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
- Examples:
- Using time zone offsets.
- Time zone variable.
- Introduction of a new notification Common Variable: MON_TIME_ZONE
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")