Crontab and timezone


 
Thread Tools Search this Thread
Operating Systems Solaris Crontab and timezone
# 1  
Old 07-26-2004
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
# 2  
Old 07-26-2004
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.
# 3  
Old 07-26-2007
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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Getting numeric timezone on HP-UX

Hi I thought the UNIX command date is universal and so I have been using date +%z to get the numberic timezone offset (e.g. -0500) however on HP-UX, this is not returning expected results; on my machine it returns the name of the time zone (e.g. EST) not numbers. does anyone know... (2 Replies)
Discussion started by: flagman5
2 Replies

2. UNIX for Dummies Questions & Answers

Need help with Timezone locale.

HI Gurus, I have a issue. One of our applications needs the data loads with the timezone (CST) but our zones run on GMT. I tried to change the TZ value under /etc/default/init value but it seems to effect the the whole zone. Is there any way I can just set up the TZ as CST for a particular user.... (2 Replies)
Discussion started by: rama krishna
2 Replies

3. Shell Programming and Scripting

Help with timezone conversion

Hi, Date_ConvTZ of module Date:Manip, converts time zone to specified server but without day time savings... $mod = Date_ConvTZ($date,"$thisTZ","$serverTZ"); US and UK timezone difference is 5 hrs, but above function will return difference of 4 hrs. Please help (1 Reply)
Discussion started by: darshakraut
1 Replies

4. Shell Programming and Scripting

Convert timezone

Hi, I have date with my server's timezone. I want to convert it with another timezone either EST or GMT, found Date:Manip module but cant find exact use, can anyone help... (4 Replies)
Discussion started by: darshakraut
4 Replies

5. Solaris

Timezone query

Hi Everyone, We have Solaris server which displays the time in CET and our application is used across the globe.(Users are in singapore, poland, US). At present in order to display Timezone we are manually manupulating time based on country in a enviromental file. I want to know , do we... (2 Replies)
Discussion started by: gehlnar
2 Replies

6. UNIX for Advanced & Expert Users

Timezone

HI ; I got Solaris8 installed oon Sunfire V440 .I have TZ=GMT in /etc/TIMEZONE , but when i log in as root i see the date in GMT+1. So i have every time to "set TZ=GMT ; export $TZ" . How can i set the TZ=GMT at the startup defenitely. Thanks :) (7 Replies)
Discussion started by: oss
7 Replies

7. UNIX for Dummies Questions & Answers

Timezone Problems

Hi all, i have running an hp-ux a-class server with hp-ux 11.00. All users without root are using the wrong timezone. root is using METDST, all others are using EDT. I have checked /etc/profile /etc/TIMEZONE /etc/ntp.conf and the .profiles from the users. But there is no failure... Is... (4 Replies)
Discussion started by: ortsvorsteher
4 Replies

8. UNIX for Dummies Questions & Answers

timezone

Hi, i am searching to change the timezone on a HP-UX11 system. Since last weekend the summertime started i am not able to change the time to the new time, every day the time changes back to wintertime. I think the problem is that the server is on the wrong timezone. Can someone help me please?... (1 Reply)
Discussion started by: eddyvdv
1 Replies

9. UNIX for Dummies Questions & Answers

Timezone

Hi, I got an question about changing timezone thrue command line on a SunOS Release 4.1.2 without restarting the computer. Now it's set on WET and I want to set the timezone to CET (GMT +1) Plz somebody help me. Regards Novisern:confused: (5 Replies)
Discussion started by: Novisern
5 Replies

10. UNIX for Dummies Questions & Answers

Timezone

Hello again, under hp-ux i have a file /etc/TIMEZONE. here is definied which timezone i am. i dont know who reads this file to set after reading the timezone under /usr/lib/tztab. my 2 questions, who reads the file /etc/TIMEZONE ( which service ) and do i need in the first line to set my... (6 Replies)
Discussion started by: ortsvorsteher
6 Replies
Login or Register to Ask a Question