1752795 Members
6235 Online
108789 Solutions
New Discussion юеВ

Re: Wrong cron date

 
SOLVED
Go to solution
Rafael Moran
Advisor

Wrong cron date

Hello !

I have a problem with one K server with 10.20. The date on the system is ok but the cron date seems to be 5 hours advanced. If I check the date:

# date
Fri Mar 1 13:32:45 EST 2002

is ok

but

# date -u
Fri Mar 1 18:32:38 UTC 2002

that matches the date when the cron executes it's jobs

The file /etc/TIMEZONE seems to be ok:
TZ=MET-1METDST
export TZ

Does anyone know what it's happening, please ?

Thank you in advanced
Hi! I'm keko
5 REPLIES 5
Rafael Moran
Advisor

Re: Wrong cron date

Sorry, I posted erroniously on the database forum.
Hi! I'm keko
Thierry Poels_1
Honored Contributor
Solution

Re: Wrong cron date

Hi,

1. is it possible that /etc/TIMEZONE has been modified after cron has been started? If so stop & restart cron.

2. your /etc/TIMEZONE show METDST timezone,
but date shows EST timezone?? Again, timezone modifications without reboot???

good luck,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.

Re: Wrong cron date

date -u returns the time in coordinated universal time, which translates into GMT - cron shouldn't use this time to determine when to run your commands - it should use your local time... are you saying its not doing that?

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Justo Exposito
Esteemed Contributor

Re: Wrong cron date

Hi Rafael,

I have this in my system and cron run fine:
HP1 #> date
Fri Mar 1 13:57:03 MET 2002
HP1 #> date -u
Fri Mar 1 12:57:11 UTC 2002
HP1 #> vi /etc/TIMEZONE
"/etc/TIMEZONE" [Read only] 2 lines, 25 characters
TZ=MET-1METDST
export TZ

Regards,

Justo.
Help is a Beatiful word
Rafael Moran
Advisor

Re: Wrong cron date

Thank your for the replies,

I had reboot the server without results. After see that the timezone was different between /etc/TIMEZONE and date I ran set_parms and set timezone again.

Then reboot and now seems to be ok so thank you very much all and greetings from Barcelona.
Hi! I'm keko