Page 1 of 1

Taking care of PST and PDT timezones in datastage

Posted: Thu Jul 19, 2007 10:21 pm
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 ?

Posted: Thu Jul 19, 2007 10:38 pm
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.

Posted: Thu Jul 19, 2007 11:29 pm
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")