Should have said that the environment is z/OS batch (started task,
actually).

Charles

-----Original Message-----
From: Charles Mills [mailto:charl...@mcn.org] 
Sent: Monday, February 20, 2012 3:01 PM
To: IBM Mainframe Discussion List
Subject: Do what to get C strftime %z to work?

I am reading the FM and I am lost in a sea of environment variables and
POSIX and gosh knows what.

If I would like the strftime() format character %z to return -0500 or +0000
or whatever, what do I have to do?

I know the system "knows" what time zone it is in, because for a given
timeb, localtime() and gmtime() return the proper times.

But the %z flag in strftime() returns no characters.

The trouble starts in localtime() because it sets tm_isdst to -1. But even
if I set tm_isdst to 0 "manually" strftime %z still returns nothing.

As a side note, the PG says "The time zone external variables, tzname,
timezone, and daylight, declarations remain feature test protected in
time.h. Definition of these external variables are only known to the C/C++
run-time library if the z/OS UNIX System Services C/C++ signature CSECT is
link edited with your C/C++ application."

What the heck is the "signature CSECT" and how the heck do you link it with
your application? I found no other references in the docs to "signature
CSECT."

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN

Reply via email to