Time Difference between date and date -u


 
Thread Tools Search this Thread
Operating Systems AIX Time Difference between date and date -u
# 1  
Old 03-19-2015
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.
Code:
 >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

Last edited by Franklin52; 03-20-2015 at 09:27 AM.. Reason: Please use code tags
# 2  
Old 03-19-2015
there's nothing to rectify.
One is in IST TZ and the other one is in GMT TZ.
This User Gave Thanks to vgersh99 For This Post:
# 3  
Old 03-19-2015
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

Last edited by rbatte1; 03-23-2015 at 02:43 PM.. Reason: Added ICODE tags
# 4  
Old 03-19-2015
man date yields:
Code:
       -u, --utc, --universal
              print or set Coordinated Universal Time (UTC)

This User Gave Thanks to vgersh99 For This Post:
# 5  
Old 03-20-2015
Code:
echo $TZ

# 6  
Old 03-23-2015
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
This User Gave Thanks to rbatte1 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

In HP-UX how to find the date time difference ?

Hello, In HP-UX how to find the date time difference ? Start time: 28-APR-2019 21:36:01 End time : 29-APR-2019 00:36:04 ---------------------- Difference is ---------------------- Much appreciate any pointer or view on this. ... (3 Replies)
Discussion started by: Siva SQL
3 Replies

2. Shell Programming and Scripting

Date time difference in UNIX shell script

There are 2 dates, Tue Oct 1 13:40:19 2013 Sun Sept 30 10:26:23 2013 I have multiple dates like the above one. How do I calculate the date time difference and display in another column in Shell script. Please help. (3 Replies)
Discussion started by: tanmoysays
3 Replies

3. Shell Programming and Scripting

Date / Time difference in shell script

Request ID GMDCOMTM GMDRRSTIME GMDRESTIME <36812986> : : :I want to display the date -time difference in other fields. Above I have given for only 1 record. I want to calculate for all the records. (GMCOMTM - GMDRRSTM) ,(GMDRRSTM-GMDRESTM) and... (5 Replies)
Discussion started by: ghosh_tanmoy
5 Replies

4. Shell Programming and Scripting

Date / Time difference in shell script

================================================================================ Request ID GMDCOM TIME GMDRRS TIME COM-RRS ================================================================================ <36812974> Tue Oct 1 13:32:40 2013 Tue Oct 1 20:36:42 2013... (1 Reply)
Discussion started by: ghosh_tanmoy
1 Replies

5. UNIX for Dummies Questions & Answers

Date and time difference

Hi, I am trying to use the script as under : echo "Please input the string (APC) in the format (APC=x-yyy-z):" read a for i in m1 m2 m4 m5 m6 do cat /m12/$i/12* | grep -B 1 -A 1 inaccessible | gawk '/'$a'/{print $6,$7,$8,x};{x=$3" "$4}' | awk NF > temp cat /m122/$i/12* | grep -B 1 -A 1... (0 Replies)
Discussion started by: vanand420
0 Replies

6. Shell Programming and Scripting

Date and time difference

I have start and finish date in the following format - Start Date: 5/21/2010 9:14:00 AM End Date : 5/24/2010 7:23:00 AM I need to get the time difference in the following format :mm or . Any help would be really appreciated. Thank you! (3 Replies)
Discussion started by: randev
3 Replies

7. Shell Programming and Scripting

Date and time difference

Hi, Below is the backup file name (includes date & time) : exp_trx_tables_18_Oct_2010_10_59_00.dmp Extracted date and time from the file name as below using the below "awk"command: date 18-Oct-2010 and time 10:59:00 echo "$fname" | awk -F"_" '{printf "Records will be restored as on... (1 Reply)
Discussion started by: milink
1 Replies

8. Shell Programming and Scripting

About date & time difference

Hello All, I was having a look on threads on the Forum about time calculation but didn't find exactly this issue. For instance, if we have these 2 dates, begin & end : 20100430235830 20100501000200 Is there anyway, awk, ksh, perl to calculate the difference in sec and get for... (6 Replies)
Discussion started by: rany1
6 Replies

9. Homework & Coursework Questions

Date comparison with 'string date having slashes and time zone' in Bash only

1. The problem statement, all variables and given/known data: I have standard web server log file. It contains different columns (like IP address, request result code, request type etc) including a date column with the format . I have developed a log analysis command line utility that displays... (1 Reply)
Discussion started by: TariqYousaf
1 Replies

10. UNIX for Dummies Questions & Answers

Date and time difference

Hi, I am starting a process at 9 pm today and want to exit the process by 5am, the next day. Every day at 9pm the shell script will be invoked by autosys. But how can i monitor in my script for 5 am and stop the process ? there may be a case where the script can start at 4.59 am and... (4 Replies)
Discussion started by: risshanth
4 Replies
Login or Register to Ask a Question