-fixed issue with unix pypo user not being assigned to groups

-fixed issue with time being incorrect if server was in different timezone
This commit is contained in:
martin 2011-01-31 16:34:08 -05:00
parent 7751ad7ac7
commit 755c5a8469
4 changed files with 6 additions and 10 deletions

View File

@ -472,10 +472,11 @@ class Schedule {
}
$timeNow = Schedule::GetSchedulerTime();
return array("schedulerTime"=>$timeNow,"previous"=>Schedule::GetPreviousItems($timeNow),
return array("schedulerTime"=>gmdate("Y-m-d H:i:s"),"previous"=>Schedule::GetPreviousItems($timeNow),
"current"=>Schedule::GetCurrentlyPlaying($timeNow),
"next"=>Schedule::GetNextItems($timeNow),
"timezone"=> date("T"));
"timezone"=> date("T"),
"timezoneOffset"=> date("Z"));
}
public static function GetPreviousItems($timeNow, $prevCount = 1){

View File

@ -72,9 +72,6 @@ function convertDateToHHMMSS(epochTime){
var hours = d.getUTCHours().toString();
var minutes = d.getUTCMinutes().toString();
var seconds = d.getUTCSeconds().toString();
//if (hours == "NaN")
//alert("epochTime: " + epochTime);
if (hours.length == 1)
hours = "0" + hours;

View File

@ -43,8 +43,6 @@ function getTrackInfo(song){
str += song.track_title;
if (song.artist_name != null)
str += " - " + song.artist_name;
//if (song.album_title != null)
//str += " - " + song.album_title;
str += ","
@ -188,6 +186,7 @@ function calcAdditionalData(currentItem, bUpdateGlobalValues){
function parseItems(obj){
var schedulePosixTime = convertDateToPosixTime(obj.schedulerTime);
schedulePosixTime += parseInt(obj.timezoneOffset)*1000;
$('#time-zone').text(obj.timezone);

View File

@ -35,9 +35,6 @@ def create_user(username):
print "Creating user "+username
os.system("adduser --system --quiet --group --shell /bin/bash "+username)
#add pypo to audio group
os.system("adduser " + username + " audio")
#set pypo password
p = os.popen('/usr/bin/passwd pypo', 'w')
p.write('pypo\n')
@ -45,6 +42,8 @@ def create_user(username):
p.close()
else:
print "User already exists."
#add pypo to audio group
os.system("adduser " + username + " pulse-access 2>&1 1>/dev/null")
def copy_dir(src_dir, dest_dir):
if (os.path.exists(dest_dir)) and (dest_dir != "/"):