HP3000-L Archives

November 2000, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Paul H Christidis <[log in to unmask]>
Reply To:
Paul H Christidis <[log in to unmask]>
Date:
Mon, 6 Nov 2000 16:18:14 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (64 lines)
Another problem that possibly is attributed to the TZ variable and the
'ctime' function, manifest itself when using the 'touch.hpbin.sys' utility
to 'set' the access date of a file.  (Poor man's method for not changing
access dates when 'scanning' files).

It turns out that 'touch' uses the 'current' setting of the TZ variable and
NOT the setting that corresponds to the specified date.  So, at my site, a
request for setting the access date to "199912312330" would instead result
in a setting of "200001010030".

I have reported it to the RC and an SR was opened (SR #8606152924 /
CR#JAGad22242), but I'm hoping that Mr. Murray's curiosity on this issue
may produce quicker results.

Regards
Paul Christidis





I wrote a COBOL program recently to display various timezones by using the
"HPCIPUTVAR" intrinsic. I was very surprised to find the times did not
change as I expected when New Zealand went onto daylight savings time and
when the USA came off daylight savings time.

Thanks to Walter Murray (HP) I have finally resolved the problem. The issue
is one that everyone should be aware of if you are using the CTIME function
in a C program or the FUNCTION CURRENT-DATE in a COBOL program.

It transpires that the TZ variable must be set with NO trailing spaces
otherwise the function cannot match the Timezone with an entry in the
TZTAB.LIB.SYS file.

This means do NOT do :SETVAR TZ "EST5EDT     " or similar. The final quote
must be immediately after the last letter.

The more probable error (which I experienced) is when setting the TZ
variable from within a program using the CALL INTRINSIC "HICIPUTVAR"... .
The variable's size must be calculated carefully to ensure there will be no
trailing spaces.

You can actually prove this by doing the following -

1. SETVAR TZ "NZST-12NZDT"
2. RUN SHOWCLKS.PUBXL.TELESUP
3. SETVAR TZ "NZST-12NZDT    "
4. RUN SHOWCLKS.PUBXL.TELESUP

This will show 2 different times for New Zealand. By the way, you may have
to change the entry in TZTAB.LIB.SYS for New Zealand as it does not have an
entry for this year (2000). Use Editor to change the 3rd line for
NZST-12NZDT from 1990-1999 to 1990-2038.

I hope this piece of information may save someone else from spending too
long trying to work out why the TZTAB file does not appear to work.

Jeanette Nutsford
<[log in to unmask]>


Phone: 1 301 9122345 (in Maryland, USA from 3 November until 9 November)
            44 1604 471526 (in England from 10 November until 10 December)

ATOM RSS1 RSS2