3

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.

slestak
  • 153
  • 1
  • 8

2 Answers2

1

This isn't something you will address via UniObjects. You will need to ensure the correct timezone is set for the udcs user on the server itself.

Dan McGrath
  • 41,220
  • 11
  • 99
  • 130
  • I was not aware there was a udcs user. That was a poor choice of words in my question. unirpcd is running as root iirc. Can you duplicate my finding on your unidata box? – slestak Jul 04 '12 at 03:03
  • No I can't, which is why it most likely means an AIX user config issue. Yes, UniRPC starts as root, then will fork a process that changes to your user logging in via UniRPC. Check that root is setup correctly in regards to timezones – Dan McGrath Jul 09 '12 at 12:11
  • I double checked the user that UniRPC forks to and it appears to have appropriate TZ setting. Checking root now. When I set serverdebug in $UDTHOME, the file that is written already has the TZ issue. The timestamp in column 1 is UTC. root in ksh is set to EST. – slestak Jul 09 '12 at 16:21
  • I was hoping ps eww on the rpc daemon might show $TZ but it doesnt. – slestak Jul 09 '12 at 16:37
0

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!

SSH This
  • 1,864
  • 4
  • 23
  • 41