Skip to content

Commit

Permalink
[webOS] Read timezone from webOS location
Browse files Browse the repository at this point in the history
The jail only mounts /etc/localtime which is a symlink to /var/luna/preferences/localtime. In this case parsing the timezone from the symlink fails. Fortunately, there is a debian like file /var/luna/preferences/timezone
  • Loading branch information
sundermann committed Sep 30, 2023
1 parent 3c30614 commit 6ae3c84
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xbmc/platform/posix/PosixTimezone.cpp
Expand Up @@ -202,6 +202,10 @@ std::string CPosixTimezone::GetOSConfiguredTimezone()
// try Slackware approach first
timezoneName = ReadFromLocaltime("/etc/localtime-copied-from");

// then check for webOS
if (timezoneName.empty())
timezoneName = ReadFromLocaltime("/var/luna/preferences/localtime");

// RHEL and maybe other distros make /etc/localtime a symlink
if (timezoneName.empty())
timezoneName = ReadFromLocaltime("/etc/localtime");
Expand Down

0 comments on commit 6ae3c84

Please sign in to comment.