Operating System - HP-UX
1847140 Members
5740 Online
110263 Solutions
New Discussion

Re: mailx time difference

 
kripa
New Member

mailx time difference

when I am sending mail by mailx the time difference is 8 hours ahead from current system time. Please tell me how to match mailx time with system time.
$date;date -u
Fri Aug 15 15:08:58 GMT 2008
Fri Aug 15 19:08:58 UTC 2008
but in mailx it is 23:08 wich is hour hour ahead.
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: mailx time difference

Shalom,

mailx time is the system time. It doesn't have its own clock.

The time or timezone settings on one of the two systems is wrong. Or perhaps the timezone setting is just wrong in one place. fix that the problem will go away.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
kripa
New Member

Re: mailx time difference

thanks a lot for your prompt reply.

but i am getting correct system time.
$date;date -u
Fri Aug 15 15:58:22 GMT 2008
Fri Aug 15 19:58:22 UTC 2008

and echo $TZ is GMT+4 in /etc/TIMEZONE file for UAE.

Please tell me where to correct timezone.

kripa

Patrick Wallek
Honored Contributor

Re: mailx time difference

Where EXACTLY are you seeing the time difference? Is it in your mail client after sending a message with mailx? If so, then check your time settings on the client.
Dennis Handly
Acclaimed Contributor

Re: mailx time difference

Your timezome is illegal.
1) You can't use any value of TZ that has GMT other than GMT0. Otherwise your time display with say GMT which will be confusing to everyone else. I.e. most people expect GMT to the the same as UTC.
2) You need a negative offset

You need to invent your own timezone name and if you want it for UAE, it should be:
TZ=UAE-4

Your machine's clock is 8 hours ahead because of the + vs -.