In the OMVS profile we set timezone like this: TZ=CST6CDT5
-6 for Central Standard and -5 for Central Daylight. -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Charles Mills Sent: Thursday, September 05, 2013 6:13 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: timezone_name? I'm looking at my C++ code. I wrote it, but I wrote it before I understood as much (?) as I do now, and before GSK surprised me and made me run POSIX(ON). Background: the code runs on many different systems and customers set their machines up the way they set them up. The code uses localtime() and also occasionally strftime() with various format specifiers. I think I have a pretty good handle on the function of the TZ environment variable. But I see code that sets the environment variable timezone_name to a string such as EST or PDT. I don't know exactly why the code is there. I am reading the notes following, for example, localtime() but I don't know what exactly to make of them. 1. I assume I do need to set timezone_name or localtime() may not function correctly, and certainly not strftime %Z. Is that assumption correct? 2. Does setting timezone_name to EST or PDT make sense? Is EST or PDT an appropriate sort of setting? 3. Is setenv() the most reasonable way to set timezone_name? I can see that my parsing of strings such as "EST5EDT" into a timezone_name is inadequate, but before I re-write it I wanted to see if it was really necessary. Is there a better way to do things? Is there a library function that will parse TZ into among other things timezone_name, so I don't have to re-invent the wheel, possibly badly? Thanks, Charles ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ========================== This email, and any files transmitted with it, is confidential and intended solely for the use of the individual or entity to which it is addressed. If you have received this email in error, please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this message by mistake and delete this e-mail from your system. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN