mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-10 07:08:28 +02:00
neutrino: improve timezone handling
* only offer timezones which are actually installed in the system
* symlink the timezone file to /etc/localtime instead of copying
Origin commit data
------------------
Branch: ni/coolstream
Commit: f130d20b64
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-03-29 (Thu, 29 Mar 2012)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -128,10 +128,15 @@ CMenuOptionStringChooser* COsdLangSetup::getTzItems()
|
||||
if (!strcmp(xmlGetName(search), "zone"))
|
||||
{
|
||||
std::string name = xmlGetAttribute(search, "name");
|
||||
// std::string zone = xmlGetAttribute(search, "zone");
|
||||
std::string zone = xmlGetAttribute(search, "zone");
|
||||
//printf("Timezone: %s -> %s\n", name.c_str(), zone.c_str());
|
||||
tzSelect->addOption(name.c_str());
|
||||
found = true;
|
||||
if (access(("/usr/share/zoneinfo/" + zone).c_str(), R_OK))
|
||||
printf("[neutrino] timezone file '%s' not installed\n", zone.c_str());
|
||||
else
|
||||
{
|
||||
tzSelect->addOption(name.c_str());
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
search = search->xmlNextNode;
|
||||
}
|
||||
|
Reference in New Issue
Block a user