DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2011-11-03 05:25:19

ottsm
Member
Registered: 2010-12-23
Posts: 44

RTC time and CRON jobs

I finally am using NTPD and happy with the file date and time being correct.  On last annoying problem, I run RSYNC every night at 2:05 with CRON.  I noticed that it was running one hour after 2:05 because my log file shows 3:06 as the file time.

If I type the DATE command I get the correct time.  If I type the RTC -r command I'm behind one hour.

It seems CRON is using the RTC time.

Anyway to get CRON to use the System clock versus the hardware clock?

setting the RTC to system time (RTC -w) doesn't work.

I've used the following to set the time zone
echo 'EST5EDT,M3.2.0,M11.1.0'>/etc/TZ

I've removed all the standard stuff from CRON like stime, etc.

Offline

 

#2 2011-11-18 02:13:49

mantr01
New member
Registered: 2008-11-22
Posts: 2

Re: RTC time and CRON jobs

what is your setup for ntpd? BTW I discontinued using ntpd after finding problems with it. I now use ntpdate from a cron entry and have full support for local date and time including daylight saving and the time appears correct in all uses.

Offline

 

#3 2011-11-18 10:46:31

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: RTC time and CRON jobs

ottsm wrote:

If I type the RTC -r command I'm behind one hour.

Let me guess, you are living in Central European timezone, or GMT+1. It's common practice the RTC is in GMT, while the system time is your local timezone. Timezone is a user setting (a system can have users all over the world), and supposedly the cron 'user' uses the GMT or UTC timezone.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB