VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Pages: 1 [2]

Author Topic: Daylight Savings Time???  (Read 3437 times)

roarde

  • Vectorian
  • ****
  • Posts: 613
  • move the needle
Re: Daylight Savings Time???
« Reply #15 on: March 16, 2013, 06:54:53 pm »

Right, sledgehammer. But in the end, your time is being set by ntp. Not sure if what rc.S does has an effect you'll notice in your case.

Thanks very much for the reply.
Logged
Robert
VL 7.1 Light

StrayBit

  • Vectorite
  • ***
  • Posts: 427
Re: Daylight Savings Time???
« Reply #16 on: March 18, 2013, 09:29:23 am »

When you shut down, the hardware clock is set to system time in /etc/rc.d/rc.k in both VL6 and VL7.0:
Code: [Select]
# Save the system time to the hardware clock using hwclock --systohc.
if [ -x /sbin/hwclock ]; then
  # Check for a broken motherboard RTC clock (where ioports for rtc are
  # unknown) to prevent hwclock causing a hang:
  if ! grep -q -w rtc /proc/ioports ; then
    CLOCK_OPT="--directisa"
  fi
  if grep -q "^UTC" /etc/hardwareclock 2> /dev/null ; then
    /etc/rc.d/rc.text 5 "Saving system time to the hardware clock (UTC)."
     # bootsplash
     progressbar 25
    echo "Saving system time to the hardware clock (UTC)."
    /sbin/hwclock $CLOCK_OPT --utc --systohc
  else
    /etc/rc.d/rc.text 4 "Saving system time to the hardware clock (localtime)."
     # bootsplash
     progressbar 20
    echo "Saving system time to the hardware clock (localtime)."
    /sbin/hwclock  $CLOCK_OPT --localtime --systohc
  fi
fi
This is working in VL6 but I haven't used VL7.0 enough to verify it is working there.

I was surprised and confused when my system updated to DST after I had manually set it the night before.  I did leave my system running that night.   Perhaps the system must be running at the change time to work.

I've added "ntpdate -b pool.ntp.org" to rc.local and extend my thanks to nightflier.

Bruce
Logged
Dell GX280: 7.1-Gold 32 bit
HP 670 Win7 & VL7.0
Gateway LT200 Win XP dead!
Pages: 1 [2]