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=EST
oc set env deploy/ds-px-default-ibm-datastage-px-runtime TZ=EST
You can set the time zone for Orchestration Pipelines 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=EST
You can check your current timezone by running the following commands:
- Open a shell on the px-compute pod, for
example:
oc rsh inst1-small-799-ibm-datastage-px-compute-0
- Run the timezone selection utility from the pod shell:
tzselect
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 in DataStage.