"Ken Hirsch" <[log in to unmask]> wrote in message
news:adgleq0rem@enews3.newsguy.com...
> From: "John Korb" <[log in to unmask]>
> > Question 2:
> > Is there a C library procedure (or Intrinsic that I've missed) that I
can
> > call from SPLASH! (or Business Basic) that lets me pass a TZ value to it
> > (ex. "EST5EDT" or "HST10"), and it returns the current hour (24 hour
> > format) in the specified time zone?
>
> There is a localtime() function.  You would have to call putenv before and
> after if you want to use a different timezone.  I don't know about calling
> these functions from Splash.

This approach might work, but will be different depending on whether you are
in the MPE environment (using the C/iX Library) or the POSIX environment
(using the POSIX/iX library).  They handle environment variables very
differently.

The putenv() function is not provided in the C/iX Library.  You'd want to
use the MPE/iX intrinsics (HPCIGETVAR, HPCIPUTVAR, HPCIDELETEVAR) to
retrieve, change, and restore the TZ session-level variable.  Note that
changing the value of TZ "on the fly" and having the change apply to
subsequent calls to the C time functions *IS* supported.  This is one of the
reasons the performance of the C time functions is not what it might be.
Every call to a C time function has to go check TZ in case it has changed.

I can't speak for the putenv() function in the POSIX/iX library.

Walter Murray
Hewlett-Packard

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *