Kick off a CL when the user sign’s on to plug in the user’s correct date, and pass it to the RPG application.
Unfortunately the TIME operation code and the %TIME built in function uses system time. Programmatically is the only way I can see to manipulate the time based on time zones.
What annoys me is that we have time zone objects (object type *TIMZON) we can define on the system, but there is not much you can do with it that I can see except to control daylight savings time. It would be nice to have a parameter that can be set on a user profile or a group profile to designate a time zone for that person and the %TIME function would use this to determine the time based on the zone. Maybe in Version 7. Lol.
It’s fairly easy to create applications that support user-based time zones. However, it requires creating the application from the beginning to do it.
A user time zone is a presentation problem. Base the system on UTC time. Store dates/times internally as UTC. Convert inputs and outputs to user time zone just as you might convert date format from user to user.
But retro-fitting UTC onto an existing application is probably far more work than it’s worth. We have a network-based application that operates on UTC in order to transfer information between systems in different time zones. It takes discipline. If the application isn’t prepared for it, there sure isn’t much that the system can do about it.