[DLNA] TV Listing Displays the Wrong Time

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

Moderator: Forum Moderators

Post Reply
jjthomas
Junior
Posts: 58
Joined: Sun Jul 19, 2015 11:53 am
United States of America

[DLNA] TV Listing Displays the Wrong Time

Post by jjthomas »

I'm running on CentOS 7. The Server time is correct. MythWeb time is correct. But when I display the listings on my TV, the time is off by several hours. Why? And how do I fix this?

Thank you.

-Julian
User avatar
bill6502
Developer
Posts: 2325
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: TV Listing Displays the Wrong Time

Post by bill6502 »

Please mention your listing source. Typically, the times are stored in UTC, so your offset is
important.

What does this return: curl --header Accept:application/json yourBackendHostNameOrIP:6544/Myth/GetTimeZone

And, of course, what timezone are you in? In at least one place in the code, Red Had
based systems look at /etc/sysconfig/clock. I'd expect that to be correct if all other times
are OK.
jjthomas
Junior
Posts: 58
Joined: Sun Jul 19, 2015 11:53 am
United States of America

Re: TV Listing Displays the Wrong Time

Post by jjthomas »

Thank you for replying,

Listing source is Schedules Direct..

{"TimeZoneInfo": {"TimeZoneID": "America\/Los_Angeles", "UTCOffset": "-25200", "CurrentDateTime": "2019-10-31T16:46:41Z"}}

TimeZone is Pacific (America\/Los_Angeles)

I could not find anything in /etc/sysconfig/clock I also checked /etc/sysconfig and there is no clock in there.

I am using ntpd to maintain my time.

Today I started a recording at 0913, it shows on my TV at 1613.

-JJ
User avatar
bill6502
Developer
Posts: 2325
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: TV Listing Displays the Wrong Time

Post by bill6502 »

Try the tests/solutions here: https://www.mythtv.org/wiki/MySQL_Time_Zone_Tables
If completely missing, I'd have expected to see an error message in the backend log (and it
wouldn't startup: "MySQL time zone support check failed"

-25200 / 3600 = -7 hours. That matches the difference in the times above. They're displaying
in UTC.
jjthomas
Junior
Posts: 58
Joined: Sun Jul 19, 2015 11:53 am
United States of America

Re: TV Listing Displays the Wrong Time

Post by jjthomas »

I went to the link you suggested. I remember when I initially setup MythTV it did complained about needing the the TZ info imported, so I loaded the tzinfo into MySql.

My results:

Code: Select all

MariaDB [(none)]> SELECT CONVERT_TZ(NOW(), 'SYSTEM', 'Etc/UTC');
+----------------------------------------+
| CONVERT_TZ(NOW(), 'SYSTEM', 'Etc/UTC') |
+----------------------------------------+
| 2019-11-06 14:49:31                    |
+----------------------------------------+
1 row in set (0.00 sec)

MariaDB [(none)]> exit
Bye
[jjthomas@anthem ~]$ date
Wed Nov  6 06:49:48 PST 2019
Your right, MythTV is showing UTC on the TV set.

Thank you,

-JJ
User avatar
bill6502
Developer
Posts: 2325
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: TV Listing Displays the Wrong Time

Post by bill6502 »

Unfortunately, those were my best shots. I modified the initial Subject: line
to add CentOS 7. See if that gets any hits (I'm a *buntu user.)

I <assume> you're using mythfrontend when mentioning: 'But when I display the listings on my TV...'
jjthomas
Junior
Posts: 58
Joined: Sun Jul 19, 2015 11:53 am
United States of America

Re: TV Listing Displays the Wrong Time [CentOS 7]

Post by jjthomas »

Cool on the subject change. I cut my Linux teeth on on Red Hat, back when it was free. I tend to keep going back to it. On my DAW I'm running Debian. I also like the *buntu's. I've got a couple of VM's running on ubuntu. I've always preferred xbuntu.

Back on Topic, :)

Times listed on mythfrontend on the server, the time is correct.
Times listed on Mythweb are also correct.
When I list the recordings, via my TV, the times are incorrect.

For the TV, I'm using DLNA.

I hope that adds some clarity.

Thank you for chiming in.
User avatar
bill6502
Developer
Posts: 2325
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: TV Listing Displays the Wrong Time [CentOS 7]

Post by bill6502 »

I don't have anything (TV etc.) to test DLNA. Changed the Subject: again.

In the Services API, which uses some UPnP, code all timestamps are sent
and returned in UTC. Not sure if that's the issue. I'll assume the TV has a
clock and that it's correct. Could there be an option for timestamps received
over DLNA?
jjthomas
Junior
Posts: 58
Joined: Sun Jul 19, 2015 11:53 am
United States of America

Re: [DLNA] TV Listing Displays the Wrong Time

Post by jjthomas »

I came across the following error in my email:

Code: Select all

366 O   Nov 23 user@localhost. (  80) [abrt] mythtv-common: requests_cache_compatability.py:40:remove_expired_responses:TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'int'
Not sure what to do with my error, or if it affects the problem I'm having.

Thank you.

-Julian
User avatar
bill6502
Developer
Posts: 2325
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: [DLNA] TV Listing Displays the Wrong Time

Post by bill6502 »

That file is used by The TV DB API, a Python script. Last time it was updated was in December 2017.
Which begs the question of the version of MythTV you're running. I use the API, as do many, and don't
see that error in my logs. No idea how it gets to you email, as that't not a MythTV feature.
jjthomas
Junior
Posts: 58
Joined: Sun Jul 19, 2015 11:53 am
United States of America

Re: [DLNA] TV Listing Displays the Wrong Time

Post by jjthomas »

Hi again,

Code: Select all

Installed Packages
Name        : mythtv
Arch        : x86_64
Version     : 29.0
Release     : 2.el7.nux
Size        : 13 k
Repo        : installed
From repo   : nux-dextop
Summary     : A digital video recorder (DVR) application
Post Reply