System time vs. Software time - IBM AS400

This is a discussion on System time vs. Software time - IBM AS400 ; We are an ASP. On our system, we have multiple companies running all
on one partition. There is a piece of software from a third party
that resets the time for a particular user based on what time zone
they ...

System time vs. Software time

We are an ASP. On our system, we have multiple companies running all
on one partition. There is a piece of software from a third party
that resets the time for a particular user based on what time zone
they are physically located. This piece of software is failing
because of some bug in the license code, so we were trying to mock up
something that changes the system time for the user and saving us a
support call. The time offset comes from a data area. So, use
gettimeofday(), add to tv_sec the offset and then set with
settimeofday(). This is setting a clock but not the one we want.

Anybody have a guess as to how this third party software is working?
We don't want to set the global system time, obviously.

Re: System time vs. Software time

"Mr. K.V.B.L." wrote in message
news:1188594339.240236.113190@w3g2000hsg.googlegro ups.com...
> We are an ASP. On our system, we have multiple companies running all
> on one partition. There is a piece of software from a third party
> that resets the time for a particular user based on what time zone
> they are physically located. This piece of software is failing
> because of some bug in the license code, so we were trying to mock up
> something that changes the system time for the user and saving us a
> support call. The time offset comes from a data area. So, use
> gettimeofday(), add to tv_sec the offset and then set with
> settimeofday(). This is setting a clock but not the one we want.
>
> Anybody have a guess as to how this third party software is working?
> We don't want to set the global system time, obviously.
>
> I'll attach a C program I wrote. It works, but not the way we want.

You don't say what release you are running, but before v5r3, settimeofday
set a "software clock" (affecting the value retrieved by gettimeofday) and
didn't change the system clock. Since v5r3, settimeofday sets the system
clock. The v5r3 memo to users
(http://publib.boulder.ibm.com/infoce...zahg/rzaq9.pdf)
discusses alternate APIs (Qp0zSetTimeOfDay, etc.) for clients that still
want support for a software clock (without modifying the system clock).

P.S. Although recent releases have added support for timezone/local time as
a system value, I don't believe the support has (yet?) been extended to
allow each job to have its own timezone/local time. I'm not sure whether
the "software clock" support mentioned above is machine-wide or specific to
one job.