Procedures to implement Egypt(Cairo) DST change in AutoSys Environments
search cancel

Procedures to implement Egypt(Cairo) DST change in AutoSys Environments

book

Article ID: 264381

calendar_today

Updated On:

Products

Autosys Workload Automation CA Workload Automation AE - Scheduler (AutoSys)

Issue/Introduction

The Egyptian government has announced that the country will reintroduce Daylight Saving Time (DST) from April 28, 2023.

The steps from resolution section are required to be implemented in all the AutoSys instances running within or using the Egypt(Cairo) zones in the job definitions to comply with the notification.

Environment

This procedure is strictly for environments running within or utilizing Egypt's time zones that have to be transitioned from Standard Time (no DST) to Daylight Saving Time (DST).

Here are the impacted timezones or aliases.
- Egypt
- Cairo
- Africa/Cairo

Resolution

Follow the below procedure to honour Egypt's (Cairo) DST change.

Windows Operating Systems

1. Apply the respective Operating System's timezone patch. 

 

2. Take a backup of the file %AUTOSYS%\Win4TimezonesNewDSTRule.cfg and update the content of the time zone tag for CAIRO as the following.

<TZ="CAIRO">
"EET-2EEST,M4.5.4/23:59:59,M10.5.4/23:59:59"
-120
"Egypt Standard Time"
0, 10, 4, 5, 23, 59, 59, 999
0
"Egypt Daylight Time"
0, 4, 4, 5, 23, 59, 59, 999
-60
</TZ>

 

3. The following database query needs to be executed against each database (in case of  AutoSys running in dual database mode) of every AutoSys instance.

Oracle 

update ujo_timezones
set zone = 'EET-2EEST,M4.5.4/23:59:59,M10.5.4/23:59:59'
where name = 'Egypt';
commit;

MSSQL/Sybase

update ujo_timezones
set zone = 'EET-2EEST,M4.5.4/23:59:59,M10.5.4/23:59:59'
where name = 'Egypt'
go

The aforementioned database query needs to be executed on all the autosys databases even if the Autosys server is running outside the 'Cairo' timezone however, some of the jobs are configured to use it.

 

4. If the Windows machine is running in Egypt(Cairo) timezone and the AutoSys version is r12 or above, then the Latest ICU res files are needed for the change to be effective.

a. Download the latest ICU res files from the below open source link, and copy them to the %AUTOSYS% directory:

https://github.com/unicode-org/icu-data/tree/main/tzdata/icunew/2023c/44/le 

b. Set the Windows SYSTEM environment variable ICU_TIMEZONE_FILES_DIR by following the procedure below:

 i. Right-click on the Windows icon located on the taskbar and select System.
 ii. In the Settings window, navigate to the Related Settings section and select Advanced system settings.
 iii. On the Advanced tab, click on the Environment Variables button.
 iv. Click the New button to create a new environment variable named ICU_TIMEZONE_FILES_DIR with the value "C:\Program Files\CA\Workload Automation AE\autosys" (Point it to the location of the downloaded files if they are copied to a different directory).
 v. Click the Apply button, followed by the OK button to ensure the changes take effect.
 vi. Restart the Windows server.

 

5. Restart the AutoSys services.

 

6. All the jobs that are configured to use  'Cairo', 'Egypt' or 'Africa/Cairo' in the job definition need to be reset (update_job: JobName) for their next runs to be rescheduled appropriately.

The below database query results in the list of jobs that are using 'Cairo', 'Egypt' or 'Africa/Cairo'  timezones.

Oracle 

select job_name
from ujo_job uj
join ujo_sched_info usi on uj.joid = usi.joid
where lower(timezone) in ('cairo','egypt','africa/cairo') and 
  uj.is_active = 1 and uj.is_currver = 1 and uj.job_ver = usi.job_ver;

MSSQL/Sybase

select job_name
from ujo_job uj
join ujo_sched_info usi on uj.joid = usi.joid
where lower(timezone) in ('cairo','egypt','africa/cairo') and 
    uj.is_active = 1 and uj.is_currver = 1 and uj.job_ver = usi.job_ver
go

 

To prevent any future runs of AEDBRefresh to overwrite the above changes to original values, it is recommended to fix couple of additional files too:

In the folder %AUTOSYS%/dbobj 
1) Make a copy of the file rdo_upgrade.adb  and then edit the original file in notepad
2) Look for below line:
command,update_20.0.0.0.0=alter='INSERT INTO ujo_timezones (type, zone, name) values (''Z'', ''EET-2'', ''Egypt'')'
3) Change it to:
command,update_20.0.0.0.0=alter='INSERT INTO ujo_timezones (type, zone, name) values (''Z'', ''EET-2EEST,M4.5.4/23:59:59,M10.5.4/23:59:59'', ''Egypt'')'
4) Save the file
5) Make a copy of the file seed_timezones.adb and then edit the original file in notepad 
6) Look for below line:
values=('Z', 'EET-2',        'Egypt')
7) Change it to:
values=('Z', 'EET-2EEST,M4.5.4/23:59:59,M10.5.4/23:59:59',        'Egypt')
8) Save the file
 

 

Linux/Unix Operating Systems

1. Apply the respective Operating System's timezone patch. 

 

2. The following database query needs to be executed against each database (in case of  AutoSys running in dual database mode) of every AutoSys instance.

Oracle 

update ujo_timezones
set zone = 'EET-2EEST,M4.5.4/23:59:59,M10.5.4/23:59:59'
where name = 'Egypt';
commit;

MSSQL/Sybase

update ujo_timezones
set zone = 'EET-2EEST,M4.5.4/23:59:59,M10.5.4/23:59:59'
where name = 'Egypt'
go

The aforementioned database query needs to be executed on all the autosys databases even if the Autosys server is running outside the 'Cairo' timezone however, some of the jobs are configured to use it.

 

3. Restart the AutoSys services.

 

4. All the jobs that are configured to use  'Cairo', 'Egypt' or 'Africa/Cairo' in the job definition need to be reset (update_job: JobName) for their next runs to be rescheduled appropriately.

The below database query results in the list of jobs that are using 'Cairo', 'Egypt' or 'Africa/Cairo'  timezones.

Oracle 

select job_name
from ujo_job uj
join ujo_sched_info usi on uj.joid = usi.joid
where lower(timezone) in ('cairo','egypt','africa/cairo') and 
  uj.is_active = 1 and uj.is_currver = 1 and uj.job_ver = usi.job_ver;

MSSQL/Sybase

select job_name
from ujo_job uj
join ujo_sched_info usi on uj.joid = usi.joid
where lower(timezone) in ('cairo','egypt','africa/cairo') and 
    uj.is_active = 1 and uj.is_currver = 1 and uj.job_ver = usi.job_ver
go

 

To prevent any future runs of AEDBRefresh to overwrite the above changes to original values, it is recommended to fix couple of additional files too:

In the folder $AUTOSYS/dbobj 
1) Make a copy of the file rdo_upgrade.adb  and then edit the original file in a text editor
2) Look for below line:
command,update_20.0.0.0.0=alter='INSERT INTO ujo_timezones (type, zone, name) values (''Z'', ''EET-2'', ''Egypt'')'
3) Change it to:
command,update_20.0.0.0.0=alter='INSERT INTO ujo_timezones (type, zone, name) values (''Z'', ''EET-2EEST,M4.5.4/23:59:59,M10.5.4/23:59:59'', ''Egypt'')'
4) Save the file
5) Make a copy of the file seed_timezones.adb and then edit the original file in a text editor 
6) Look for below line:
values=('Z', 'EET-2',        'Egypt')
7) Change it to:
values=('Z', 'EET-2EEST,M4.5.4/23:59:59,M10.5.4/23:59:59',        'Egypt')
8) Save the file
 

 

Additional Information

AutoSys Workload Automation WebUI (WCC):

WebUI displaying incorrect time (+1 hour) in the user interface due to an erroneous DST change. The following patches are released to address the problem in the respective WebUI component release.

Solution for WebUI release 12.0.00 and 12.0.01:
 
Solution for WebUI release 12.1.00:

 

AutoSys Workload Automation Agents: 

Although this change will not affect the Workload Automation agents, it is worth noting that the timestamps recorded in the agent logs located in <AGENT_INSTALL_DIR>/log are one hour ahead of the server time zone, if the Agent machine is running in Cairo time zones. This can be resolved by upgrading the Java Runtime Environment (JRE) used by the agent, which can be found in <AGENT_INSTALL_DIR>/wla_jre, to the latest version of JRE8 (u362 or higher).