On Fri, 23 Aug 2019 14:46:03 -0400, Joe Monk wrote:

>/* get the local offset from GMT */
>days_diff = mvsvar('SYMDEF','LYR4') - mvsvar('SYMDEF','YR4')
>if days_diff = 0 then
>days_diff = mvsvar('SYMDEF','LJDAY') - mvsvar('SYMDEF','JDAY')
>
>hours_diff = mvsvar('SYMDEF','LHR') -,
>mvsvar('SYMDEF','HR') + 24 * days_diff
>
>min_diff = right(abs(mvsvar('SYMDEF','MIN') -,
>mvsvar('SYMDEF','LMIN')),2,'0')
>
>sign = substr('+-',(hours_diff < 0)+1,1)
>
>gmt_offset_hhmm = sign || right(abs(hours_diff),2,'0')min_diff
>
I don't see where that sets an environment variable.  Please enlighten us.

With some trivial tailoring, that could be put in POSIX format, but
it's still not in the environment.


>On Fri, Aug 23, 2019 at 2:40 PM Dana Mitchell wrote:
>
>> We don't have C,  I'd like to do something like this in REXX and run it
>> from ~/.profile or /etc/profile, but I can't figure out how to set the TZ
>> environment variable in the REXX.

Call your Rexx exec (not the one above, which is woefully ISPF-dependent)
from .profile using command substitution, then assign and export that result.

I'll note that a couple desktop systems do not set TZ in the
environment, but set a default otherwise (which POSIX allows).

Linux:
557 $ echo ${TZ-not set}; date; ls -l /etc/localtime
not set
Fri Aug 23 13:09:24 MDT 2019
lrwxrwxrwx 1 root root 34 Aug 15 17:46 /etc/localtime -> 
/usr/share/zoneinfo/America/Denver

MacOS:
508 $ echo ${TZ-not set}; date; sudo systemsetup -gettimezone
not set
Fri Aug 23 13:09:22 MDT 2019
Time Zone: America/Denver

IBM ought to fall in step with the pervasive UNIX convention (yes,
not a standard) and provide for a default setting of local timezone.

IBM doesn't care.

-- gil

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

Reply via email to