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 2010-10-05 01:56:03

asluiter
Member
From: Melbourne, Australia
Registered: 2008-11-08
Posts: 9

Daylight Savings for Eastern Australia 2010-2011

In case anyone is vaguely interested DST times have changed again, so here is a script to set the date correctly in FFP:

0. Check the current date/time
1. vi /ffp/start/settz.sh
2. Copy the following line into the script:

echo 'AEST-10AEDT-11,M10.1.0/02:00:00,M4.1.0/03:00:00' > /etc/TZ

3. Save the script and make it executable.
4. Run the script for it to take effect.
5. Check the date has changed.

PS: I set the NTP server(s) via the web interface.

The web interface for the Dlink prevents you from putting in the correct dates for Australia, so this is a handy work-around.

Offline

 

#2 2010-10-05 03:47:09

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: Daylight Savings for Eastern Australia 2010-2011

A couple of other things that I had to do in order to correctly make a similar change in my setup, for EST time in Canada......

First, I put my 'echo' statement into /ffp/etc/fun_plug.local instead of a standalone script in /ffp/start so that it gets run earlier in the bootup sequence, not a big deal, but you never know.

I also had to remove 2 lines from the existing crontab list. These were set to run and reset the time which ends up messing around with /etc/TZ again. I had to remove the 'daylight' and 'stime' entries. These of course get re-added on a reboot so you have to get fancy.

I save the original crontab entries on a restart and remove the lines in question.

CRONFILE=/ffp/etc/crontab_default.txt
echo "Saving default crontab entries to $CRONFILE"
/bin/crontab -l >$CRONFILE
echo "Removing timezone related entries"
sed -i "/daylight/d" $CRONFILE
sed -i "/stime/d" $CRONFILE

Later on, I use this file as a starting point and then add my own crontab entries that I want to load on each bootup.

Last edited by FunFiler (2010-10-05 03:48:07)


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#3 2010-10-06 09:39:54

chriso
Member
Registered: 2009-03-29
Posts: 74

Re: Daylight Savings for Eastern Australia 2010-2011

asluiter wrote:

The web interface for the Dlink prevents you from putting in the correct dates for Australia, so this is a handy work-around.

The idea to set "dates" in the web interface are just plain wrong.  Daylight savings rules are like change on the first Sunday of the 3rd month.  If you set a "date" it will only be right for the year you set it, next year it will be wrong.  Using the extended format as you have in the TZ file is the right way to do it.

Last edited by chriso (2010-10-06 09:42:49)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB