Page 1 of 2

Daylight savings time change

Posted: Wed Apr 10, 2019 4:17 am
by ispyisail
Using 1.11.x

I have a rule that blocks the kids internet at 9:00pm

When day light savings changed they complained that the internet was cut at 8:00pm.

I logged into the router and I could see that the time had changed to the correct time but the rule was still blocking at the old time

Image

I then rebooted the router and the internet started to work as expected.

Must be some trigger that is not activating?

Re: Daylight savings time change

Posted: Wed Apr 10, 2019 5:25 am
by ispyisail
Rule

Image

Re: Daylight savings time change

Posted: Wed Apr 10, 2019 8:16 am
by RomanHK
I have the only explanation that "cron" is not synchronized - but it's just a belief :?: .

Re: Daylight savings time change

Posted: Wed Apr 10, 2019 8:52 am
by Lantis
It would have been good to see more details, but i'm sure the kids were quite unhappy and would not have tolerated "i need to leave it broken to collect information" as an excuse ;)

There's a cron job which is supposed to reset the kernel time based on userspace time every 10 minutes. If that didn't run, it could have caused the issue.
But if you navigated to the Bandwidth page (the one with the graphs) it would have triggered that function and corrected it.

Ultimately, i'm not sure.
There are a few DST related bugs floating around and we generally only have 4 or 5 times a year to catch them (without me doing some manual work to force them) and they are never top of mind when it comes up!

Re: Daylight savings time change

Posted: Thu Apr 11, 2019 1:30 am
by ispyisail
When it happens again what information would you like?

In the big picture its not a major bug.

Re: Daylight savings time change

Posted: Thu Apr 11, 2019 2:24 am
by Lantis
What the cron list looks like, any log errors and dmesg. Not sure. Shotgun approach.

Re: Daylight savings time change

Posted: Thu Apr 11, 2019 2:59 am
by ispyisail
Thanks

Re: Daylight savings time change

Posted: Thu Apr 11, 2019 3:12 am
by RomanHK
So I wonder :?: , a) if the command "set_kernel_timezone" corrects the cron time, b) if it is not a long time (EDIT: every 10 minutes) - then I would see that the rule will not work or will, but it will be shifted - I don't suppose it would be here. EDIT: c) rule is written in Firewall, so if Firewall doesn't have the wrong time.

Re: Daylight savings time change

Posted: Thu Apr 11, 2019 1:30 pm
by RomanHK
So I simulated it and the result is:
:( I confirm that kernel sync with the /usr/bin/set_kernel_timezone command does not work. I even tried to edit /etc/TZ and /etc/config/system files - no change, the rule does not work. Log errors and dmesg are clean.

;) After entering the "date -k" command, the kernel was synchronized and the rule started to work.

The "set_kernel_timezone" file is a compiled bin (it's not a script) and I can't figure out why it doesn't work.

:idea: So I suggest changing the file /etc/init.d/set_kernel_timezone from "/usr/bin/set_kernel_timezone >/dev/null 2>&1" to "/bin/date -k >/dev/null 2>&1"

Re: Daylight savings time change

Posted: Thu Apr 11, 2019 5:13 pm
by Lantis
So what were the steps to test it?
I would have thought ntpd would take care of that side.