Time Difference between date and date -u

Hi Everyone,

We are having an issue with date and date -u in our AIX Systems.

We have checked environment variable TZ and /etc/environment and however, we could not rectify the difference.

 >date
 Thu Mar 19 22:31:40 IST 2015
 >date -u
 Thu Mar 19 17:01:44 GMT 2015

Any clue on how to rectify this.

Thanks and Regards
Madhav

there's nothing to rectify.
One is in IST TZ and the other one is in GMT TZ.

1 Like

Hi Vgersh,

Thanks for the quick reply. However the story behind this issue is, we are trying to set up Kerberos authentication between AIX & Windows AD for an SAP Application.

The SAP Application server is controlled by a user at AIX and the time zone for that user is shown exactly as the time zone in date -u even though it is explicitly set in TZ.

The Kerberos ticket is failing with an invalid time and that is why we are trying to see if date -u and date difference is a problem

Thanks and Regards
Madhav

man date yields:

       -u, --utc, --universal
              print or set Coordinated Universal Time (UTC)
1 Like
echo $TZ

So my question is about the time zone setting for both servers (Windows & AIX):-

  • Are the time zones the same?
  • Are the servers all keeping their clocks in sync?

I would expect that Windows will also implement a time zone function and that what you really need to co-ordinate is that the real clock (Universal Co-ordinated Time, Zulu or GMT) needs to match and that the time zone that is applied to offset against the real clock is consistent.

If you have one in IST and the other having it's clock manually set but still in GMT, then that might be the mismatch. Even letting the clocks drift a little might cause an invalid handshake, so it's important to keep the clocks synchronised.

Robin

1 Like