On Mon, 20 Feb 2012 15:01:09 -0800, Charles Mills wrote:

>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."
>

There are references to signature CSECTs in the "Language Environment Vendor 
Interfaces" manual.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/CEEV11A0/CCONTENTS

For example, in chapter 4:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/CEEV11A0/1.4.4.6

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/CEEV11A0/1.4.4.9

This IBM-MAIN thread in 2000 mentions the signature CSECT for C, which is 
CEESG003. Maybe you just need to include it in your linkedit step. In your case 
I would have thought it was already linked since your program is in C.

http://groups.google.com/group/bit.listserv.ibm-main/browse_thread/thread/bc90235af896d99

I can't say if this will solve your problem with getting strftime to show the 
time zone information, but maybe it helps a little.

Bill

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to