Daylight Saving Time (DST) and Time Zone

Database
Enthusiast

Daylight Saving Time (DST) and Time Zone

We have Teradata installations and the Time Zone offset by default is 0, although the Time Zone on the system is -5 GMT.

Only way we can figure out Time Zone is through ResUsage tables, where we have TheTime and GmtTime fields, taking the difference between them (and
taking TheDate into consideration) can tell us the GMT offset on the system.

We have to query Teradata with time filters from different Time Zone. By calculating the offset (as mentioned above) we can convert Time to/from our location to query according to Teradata's Time Zone.

One problem that we are facing is that when DST changes occur i.e. when DST is enabled/disabled on Teradata, we won't know about it until we check the GMT offset from ResUsage tables every time (currently we are calculating the offset once).

Is there any elegant/efficient/alternative mechanism to check for DST changes OR to do Time Zone conversions.
5 REPLIES
Enthusiast

Re: Daylight Saving Time (DST) and Time Zone

Any Teradata gurus on this one??
Enthusiast

Re: Daylight Saving Time (DST) and Time Zone

Any comments, suggestions?
Enthusiast

Re: Daylight Saving Time (DST) and Time Zone

Hi Iqbal,

I was wondering if you figured out the ways to do this effectively.. I am kind of in the same boat can we find out the offset after DST without querying the resusage tables ?
Enthusiast

Re: Daylight Saving Time (DST) and Time Zone

We queried Teradata on this issue as well but there was no elegant way while using the DB. One way that they suggested was to use the BTEQ to print out the timezone information on the system (in some file) and then we could read it, but it didn't work our way as we had access to database only.
So we went ahead with checking the ResUsage table to find the offset continuously and determine the DST if it's changed.

In fact we query the table to determine all the available offsets and then choose the min. one to programmatically compute the appropriate time (i.e. with or without DST).
Enthusiast

Re: Daylight Saving Time (DST) and Time Zone

Thank You Iqbal.