1832595 Members
3088 Online
110043 Solutions
New Discussion

DST time function

 
san_intel3
Occasional Advisor

DST time function

We are using aCC compiler of version A03.30. In some of the source files we are using Time.h file to get the time. I came to know that this time function uses the lib++.a(/opt/aCC/lib/lib++.a) library to fetch the time. To get rid of from DST changes which will be effect from March 11, 2007 we need to apply patches provided by the HP for aCC compiler(To update all libraries)
So, for the version A03.30 whether HP is providing any support or do we need to go for upgradation??
If upgradation is necessary...is there any alternative to get rid of this problem???

6 REPLIES 6
Robert-Jan Goossens
Honored Contributor

Re: DST time function

Hi,

Did you look at this link.

http://h10072.www1.hp.com/dst/

Regards,
Robert-Jan
Dennis Handly
Acclaimed Contributor

Re: DST time function

Why are you using the obsolete Standard Components? This was obsolete when aC++ was introduced in 1997 and we said to use the C++ Library instead. You need to think about rewriting your application to use ctime(3).

The fine print on the page Robert-Jan mentions says that you have to purchase the A.03.70 compiler (free if you have support). Then extract lib++.a from it.

Alternately in a few days when the DST page is updated, it will mention a ftp site where you can download a site specific patch PHSS_35968, that just has lib++.a.

Note: If you didn't know it, Time/Place do NOT have support for other than US timezone DST rules. In fact, after the above patch, you will not be able to have the correct time in Mexico and Canada, if they don't match the US rules.
san_intel3
Occasional Advisor

Re: DST time function

Thanks denny and robert

So, we need to go for A03.70 version of aC++ compiler and have to update the existing lib++.a library with the new library given in the new version. correct? or do we need to update all the libraries and re-build the entire code??

Finally, we are using US time information only.
san_intel3
Occasional Advisor

Re: DST time function

What all functions will be affected in Time.h header because of this DST changes.

If we use a function that only return month and day(not the time) will that be affected because of this DST changes?
Dennis Handly
Acclaimed Contributor

Re: DST time function

>we need to go for A03.70 version of aC++ compiler and have to update the existing lib++.a library with the new library given in the new version. correct?

Yes, or wait for that patch. (I just checked, that patch only goes back to A.03.30, so it will work for you.)

>or do we need to update all the libraries and re-build the entire code??

No, just relink

>we are using US time information only.

That's good.

>What all functions will be affected in Time.h header because of this DST changes.

Only Place and Place::here is changed. That is called for the Time(unsigned y, Month m, unsigned d);

>If we use a function that only return month and day(not the time) will that be affected because of this DST changes?

If you never add Duration to the above Time, it seems you maybe ok. (Or your Duration is always in days.)

Time::clock_part would have problems.
Dennis Handly
Acclaimed Contributor

Re: DST time function

If you go chasing the links off of the
http://www.hp.com/dst/ you will eventually get to http://h21007.www2.hp.com/dspp/files/unprotected/DST2.pdf
Where the ftp site for those special patches is listed.