MythTV confused by daylight saving time

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
AdamJacobs
Junior
Posts: 18
Joined: Sat Dec 26, 2020 5:58 pm
Great Britain

MythTV confused by daylight saving time

Post by AdamJacobs »

I've been using various versions of MythTV for over 10 years, and in the past, it's always just updated itself automatically whenever the clocks have changed as we enter or leave daylight saving time. But this time, it hasn't. I'm in the UK, where the clocks went forward 1 hour from GMT to BST at the weekend, but my MythTV thinks we're still on GMT and is showing TV schedules that are out by an hour.

Since the last time the clocks changed, I've switched from running MythTV 0.29 on Ubuntu desktop to running MythTV 0.31 on Ubuntu server. Initially I found the server didn't change the clock either, but that was fixed easily enough so that the server now uses BST. But that didn't convince MythTV, which is still showing a time that's 1 hour out.

A little googling took me to this page:

https://www.mythtv.org/wiki/MySQL_Time_Zone_Tables

but I'm not sure it really has the answer. I tried the little query at the top of the page which gave me this:

Output from SQL command SELECT CONVERT_TZ(NOW(), 'SYSTEM', 'Etc/UTC'); ..
CONVERT_TZ(NOW(), 'SYSTEM', 'Etc/UTC')
2021-03-30 06:33:10

and according to that page, it means that the time zone tables and no further action is needed (that time is the time in GMT).

What am I missing here?

Many thanks
Adam
jksj
Senior
Posts: 148
Joined: Thu Feb 13, 2014 7:53 pm
Great Britain

Re: MythTV confused by daylight saving time

Post by jksj »

I find I always have to reboot the backend on the day after the change but apart from that works fine.
mythtv v32 (but worked fine on v31)
I use EPG data for scheduling.
User avatar
pgbennett
Developer
Posts: 503
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: MythTV confused by daylight saving time

Post by pgbennett »

I have never had to reboot after the change to daylight savings.
try

Code: Select all

timedatectl
also

Code: Select all

man timedatectl
You may see some error in the settings and a way to fix it.
AdamJacobs
Junior
Posts: 18
Joined: Sat Dec 26, 2020 5:58 pm
Great Britain

Re: MythTV confused by daylight saving time

Post by AdamJacobs »

Thanks for the replies.

Anyway, this is a bit weird. Without my doing anything at all, it's back on the right time now. I wonder if there is some kind of cron job or something that syncs MythTV with the server time but doesn't necessarily run immediately?
jksj
Senior
Posts: 148
Joined: Thu Feb 13, 2014 7:53 pm
Great Britain

Re: MythTV confused by daylight saving time

Post by jksj »

My experience is the same - it needs some sort of event after the clock change to get scheduling to see the change. Otherwise the first recording is an hour out.
User avatar
pgbennett
Developer
Posts: 503
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: MythTV confused by daylight saving time

Post by pgbennett »

There may be a bug here. I normally have my backend shut down and starting up with a timer event when a recording is scheduled, so it would be restarted anyway after the time change. I know the timer events are OK with the time change, but the backend may not. Once the scheduler has run, the future events are set. On restart or a reschedule they are recalculated.
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: MythTV confused by daylight saving time

Post by bill6502 »

There were massive changes in 0.26 to solve the DST issue: https://www.mythtv.org/wiki/UTC

Back then, I shutdown when idle and didn't have the issue. But for the last few years, my
backend is always on - and I still don't have any trouble when the time changes.

Looking with journalctl, I can see that there were a dozen recordings (correctly) made
after the time change, and between any boots. journalctl --list-boots helps if running systemd.

Wondering if running ntp or timesync is why it works for me. journalctl --boot --unit systemd-timesyncd
Post Reply