Taking care of PST and PDT timezones in datastage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Taking care of PST and PDT timezones in datastage

Post by ag_ram »

Hi all,

We are currently working in a project for a client in California, and in California PST ( Pacific Standard Time) is followed during winter and PDT(Pacific Daylight Time ) during summer.

We will be running some jobs which will be transform data on Hourly basis.Our business logic is that our mapping columns will change acccording to the time standard being followed. ( for e.g. map Column data from C1 to Z1 from excel file and For long day map Column data from C1 to AA1 from excel sheet).

So we need to know to take care of this switch of time Standard from PST to PDT in our jobs. Is there any patch or any provision in Datastage for this ?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

"Time" contains no notion of time zone, so there is no actual patch possible for this issue. You need to know what your source time location is (Standard) and then use the daylight savings rules for switching between PDT and PST to convert to appropriate "local time".
If your UNIX server is setup correctly, the date command will return the current date, time and timezone so you might be able to use that as a starting point.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you are using server jobs (which one can assume from the forum in which you posted your question) you can use Oconv() to determine the current time zone.

Code: Select all

Oconv(Date(), "DZ")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply