javau2unidatauniobjects

How do I set the timezone for UniObjects?


I am connecting to an AIX 5.3 box from Win7Pro using Uniobjects for Java. When the udcs user logs in, /etc/profile is executed. It appears that /etc/environment is not sourced.

If a rpc method (using aix user 'sbr') calls a Unidata subroutine that uses TIME(), its result is UTC. If the same user ('sbr') logs in and does the same action (without rpc), TIME() returns UTC-5.

When discussing this with my support people, I was told that UniObjects rpc calls execute /etc/profile, but never check the users home directory for a .profile. Like I said in my first sentence, it appears that /etc/environment is not used either.

Note: I didn't initially tag this as java because this is consistent with the VB bindings to the same rpc service.


Solution

  • I have spent a few hours trying to fix this problem.

    The real solution here is to not rely on the TIME() function for anything vital. If you fix the problem on this specific box, simply moving it to another box, the problem may arise again.

    Also, what if other programs are equally sensitive to time zone settings (ie. cron jobs), messing with these settings may conflict with these.

    Fortunately, I could refactor my UniBasic function to not rely on the TIME() function.

    Good luck!