Setting the time zone in DataStage

You can configure the TZ environment variable in DataStage to set the time zone.

To set the TZ environment variable for the DataStage PX runtime pods for the ds-px-default instance, run the following commands:
oc set env sts/ds-px-default-ibm-datastage-px-compute TZ=<timezone>
oc set env deploy/ds-px-default-ibm-datastage-px-runtime TZ=<timezone>

Select one of the following time zones: GMT, CET, EET, MSK, GST, PKT, BST, ICT, AWST, JST, AEST, SBT, NZST, AZOT, FNT, BRT, AST, EST, CST, MST, PST, AKST, HST, NUT.

You can set the time zone for DataStage in your config map. For more information, see Configuring global objects for Orchestration Pipelines.

If you are generating the date from an Orchestration Pipelines Bash script node, include the following command to overwrite the value for an individual node:
export TZ=<timezone>
You can check your current time zone by running the following commands:
  1. Open a shell on the px-compute pod, for example:
    oc rsh inst1-small-799-ibm-datastage-px-compute-0
  2. Run the time zone selection utility from the pod shell:
    tzselect
You should see the following message:
Please identify a location so that time zone rules can be set correctly.
Please select a continent, ocean, "coord", or "TZ".
...
The following information has been given:

	United States
	Eastern (most areas)

Therefore TZ='America/New_York' will be used.
Selected time is now:	Fri Jul 19 16:00:49 EDT 2024.
Universal Time is now:	Fri Jul 19 20:00:49 UTC 2024.
Is the above information OK?
1) Yes
2) No
In DataStage, the following CEL functions support the optional TZ argument:
ds.TimeDate()
ds.Day()
ds.Month()
ds.Year()
ds.Date()
ds.Time()
ds.CurrentDate()
ds.CurrentTime()
ds.CurrentTimestamp()
ds.CurrentTimestampMS()
ds.JobStartTimestamp()
ds.JobStartTime()
ds.JobStartDate()
For more information about CEL functions, see CEL expressions and limitations.