Opened 16 years ago
Closed 15 years ago
Last modified 15 years ago
#5896 closed defect (fixed)
Allow NIS-format /etc/timezone
Reported by: | Owned by: | sphery | |
---|---|---|---|
Priority: | minor | Milestone: | 0.22 |
Component: | mythtv | Version: | head |
Severity: | medium | Keywords: | timezone modify header |
Cc: | Ticket locked: | no |
Description
Running svn head 19027. All web pages are working but displaying the following errors. User Notice at /var/www/html/mythweb/includes/mythbackend.php, line 176: Failed to set php timezone to US/Pacific highley-recommened.com
Warning at /var/www/html/mythweb/includes/utils.php, line 163: Cannot modify header information - headers already sent by (output started at /var/www/html/mythweb/includes/errors.php:143)
Attachments (1)
Change History (13)
comment:1 Changed 16 years ago by
Status: | new → infoneeded_new |
---|
comment:2 Changed 16 years ago by
I'm running frontend and backend on Fedora 8. Results of script: Net::UPnP::ControlPoint? is not installed! Current Timezone Information
id: US/Pacific highley-recommened.com
offset: -28800
time: 2008-11-09T13:35:03
Changed 16 years ago by
Attachment: | mythtv-5896-allow_NIS_format_etc_timezone.patch added |
---|
Allows the use of NIS-format /etc/timezone (in addition to Debian-format /etc/timezone)
comment:3 Changed 16 years ago by
The patch mythtv-5896-allow_NIS_format_etc_timezone.patch adds a new function parse_zone_id_config_string() that parses the value read from /etc/timezone or /etc/sysconfig/clock to ensure the value used is a valid time zone ID in the zoneinfo database. This allows us to identify the time zone for users with NIS-format /etc/timezone files, which use the format:
[zone id] [host or NIS domain name] # optional comments
as opposed to the Debian-format /etc/timezone which contains only the zone ID.
Since whitespace may exist in the zone ID and the only delimiter between the zone ID and the NIS host/domain name is whitespace, parse_zone_id_config_string() just checks for a file in the zoneinfo DB whose name corresponds to the parsed value. If not found, it removes one word from the right of the string and tries again until it either finds a file or runs out of string.
The patch also modifies the regexp used in read_time_zone_id() to allow a hash/pound character in the line to begin a comment and ensures the comment is ignored. Also, whereas read_time_zone_id() used to blindly accept the value it read as a time zone ID, the new conditional (in the 3rd hunk) requires that the value correspond to a valid zone ID in the database, otherwise, we continue searching for the time zone ID.
comment:5 Changed 16 years ago by
Component: | mythweb → mythtv |
---|---|
Owner: | changed from xris to Isaac Richards |
Status: | infoneeded_new → new |
comment:6 Changed 16 years ago by
Summary: | More PHP web page display errors → Allow NIS-format /etc/timezone |
---|
comment:7 Changed 16 years ago by
Milestone: | unknown → 0.22 |
---|---|
Owner: | changed from Isaac Richards to stuartm |
Status: | new → accepted |
comment:8 Changed 16 years ago by
I have similar problem with freshly installed trunk on Fedora 10. In the machine /etc/sysconfig/clock contains:
# The ZONE parameter is only evaluated by system-config-date. # The time zone of the system is defined by the contents of /etc/localtime. ZONE="Europe/Helsinki"
Error in MythWeb is:
Failed to set php timezone to U
Running the Perl script gives:
$ ./myth_timezone.pl Use of uninitialized value $name in concatenation (.) or string at ./myth_timezone.pl line 44. Current Timezone offset: UNKNOWN_COMMAND name:
Tried to apply Sphery's attached patch but it doesn't seem to fix the issue for me.
comment:9 Changed 16 years ago by
comment:10 Changed 16 years ago by
Owner: | stuartm deleted |
---|---|
Status: | accepted → new |
comment:11 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:12 Changed 15 years ago by
Owner: | set to sphery |
---|
Please run the script found at http://svn.mythtv.org/trac/attachment/ticket/5319/myth_timezone.pl and post the output.