Crontab and timezone

I am running SunOS 5.6. If I login with a ksh shell and type 'date'. I get the correct date and time related to the TZ, that is,
>Tuesday July 27 09:50:25 NZST 2004

However, if I run under crontab, I get this.
>Mon Jul 26 20:49:00 ESTEDT 2004

My question is; Does anyone know how to fix this problem ?

Thanks

It almost sounds as if the system is actually on ESTEDT - and that when users log in, then the NZST is set. Does this happen with all user accounts?

If this is an X86 Solaris box, check the man page for the rtc command - you can manually set the correct zone. You might want to check the /etc/rtc_config file (if it exist) first to see if it's set incorrectly.

You might also look into the default settings that users get when logging in. There may be a change that was posted in there.

I had the same problem in the past.
I did the following to resolve it:

make sure TIMEZONE is setup in the /etc/TIMEZONE file.
stop and start cron daemon:
/etc/init.d/cron stop
/etc/init.d/cron start

Hope this helps.

jerry