Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date command gives wrong time when used in program

Status
Not open for further replies.

jdfab5

MIS
Mar 7, 2002
3
US
When I use the Date command from a command line the correct date and time are given. The problem is when I use the Date command in an awk program it gets the wrong time. I have checked my timezone settings and they appear to be correct. I can't figure out where it is getting the wrong time. What else besides timezone should I check?
Thanks.
 
That is not possible. There is only one date command and if that works from command line then it will gives you same result in script.

use full path in script. i.e
#which date
/usr/bin/date then use that in script.

Yes there are two binarys one in /usr/bin and one in /sbin.
They are both in different size. if possible then find out date patch and install it.

Patel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top