Opened 12 years ago

Closed 11 years ago

#10906 closed Bug Report - General (fixed)

Myth-setup stops with error message regarding time zones

Reported by: grotepass@… Owned by: Raymond Wagner
Priority: minor Milestone: 0.27
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Myth-setup stops with a message regarding time zones. The problem is easily fixed by issuing mysql_tzinfo_to_sql using the time zone directory (on my gentoo system /usr/share/zoneinfo) eg "mysql_tzinfo_to_sql /usr/share/zoneinfo |mysql -u root -p<rootpw>" Adding this output to mythtv-setup can help solving the issue faster.

Change History (8)

comment:1 Changed 12 years ago by Raymond Wagner <rwagner@…>

Owner: set to Raymond Wagner <rwagner@…>
Resolution: fixed
Status: newclosed

In 451cd30c6a64c7231482cbc506ed0a8680e4379b/mythtv:

Add hint for MySQL timezone error.

This adds a comment to the logs about mysql_tzinfo_to_sql for how to
apply the necessary time zone information to MySQL during startup.

Fixes #10906

comment:2 Changed 12 years ago by Raymond Wagner

Milestone: 0.26

comment:3 Changed 12 years ago by grotepass@…

Groovy, will help alot. The shoddy documentation of mysql_tzinfo_to_sql took some time to point one that one should load the whole directory instead of just one's own time zone. That is not the responsibility of Myth, though. I also saw that the entire time zone set should be loaded, since UTC is tld. for zone info, so loading only a subsection, say americas is not good enough.

comment:4 Changed 11 years ago by andrew.berridge@…

Resolution: fixed
Status: closednew

This error was still occurring even after I added the tzinfo to mysql. The cause is that the distribution I am using (FreeBSD, well, FreeNAS) does not have a timezone called UTC. It has something called Etc/UTC, and it appears that mythtv checks for the existence of UTC (quite reasonably). Can we have it also check for Etc/UTC?

I have added info to the wiki here:

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

Think this error message also needs better info - it's not immediately obvious to the user/admin to go to the wiki and search for the page. Maybe a link to the wiki page could be given in the error message?

comment:5 Changed 11 years ago by gary.buhrmaster@…

My BSD system is currently unreachable, but one could try to copy /usr/share/zoneinfo/Etc/UTC to /usr/share/zoneinfo/UTC as a bypass.

comment:6 Changed 11 years ago by paulh

Milestone: 0.260.27
Owner: changed from Raymond Wagner <rwagner@…> to Raymond Wagner
Status: newassigned

So we just need to add a check for Etc/UTC if the check for UTC fails in DBUtil::CheckTimeZoneSupport?()?

http://code.mythtv.org/cgit/mythtv/tree/mythtv/libs/libmythbase/dbutil.cpp#n879

comment:7 Changed 11 years ago by Raymond Wagner

Status: assignedaccepted

comment:8 Changed 11 years ago by Raymond Wagner <rwagner@…>

Resolution: fixed
Status: acceptedclosed

In c6836330ca9b3242af58b247e8a2d28bf6c9da51/mythtv:

Replace all uses of UTC timezone with more standard Etc/UTC

This replaces all use of the UTC Olson timezone with the Etc/UTC
timezone. I'm uncertain which is more proper, but there are systems that
lack the UTC timezone, but I've not found any lacking the Etc/UTC
timezone. This resolves an issue where users were not able to update and
run even after importing their timezone database into MySQL.

There may still be some lingering instances I've missed, but those
should only affect systems that were already unable to function due to
lack of the UTC timezone.

Fixes #10906

Note: See TracTickets for help on using tickets.