cc-2682: not using pypo time
-Remove messages being sent to pypo to change its timezone -fix time conversion bug in pypo-push
This commit is contained in:
parent
61e1c56244
commit
03f8163764
|
@ -264,7 +264,6 @@ class Application_Model_Preference
|
|||
Application_Model_Preference::SetValue("timezone", $timezone);
|
||||
date_default_timezone_set($timezone);
|
||||
$md = array("timezone" => $timezone);
|
||||
RabbitMq::SendMessageToPypo("update_timezone", $md);
|
||||
}
|
||||
|
||||
public static function GetTimezone(){
|
||||
|
|
|
@ -102,10 +102,6 @@ class PypoFetch(Thread):
|
|||
if(command == 'update_schedule'):
|
||||
self.schedule_data = m['schedule']
|
||||
self.process_schedule(self.schedule_data, "scheduler", False)
|
||||
elif (command == 'update_timezone'):
|
||||
logger.info("Setting timezone to %s", m['timezone'])
|
||||
os.environ['TZ'] = m['timezone']
|
||||
time.tzset()
|
||||
elif (command == 'update_stream_setting'):
|
||||
logger.info("Updating stream setting: %s", m['setting'])
|
||||
self.regenerateLiquidsoapConf(m['setting'])
|
||||
|
|
|
@ -152,7 +152,7 @@ class PypoPush(Thread):
|
|||
#mktime takes a time_struct and returns a floating point
|
||||
#gmtime Convert a time expressed in seconds since the epoch to a struct_time in UTC
|
||||
#mktime: expresses the time in local time, not UTC. It returns a floating point number, for compatibility with time().
|
||||
epoch_start = calendar.timegm(time.gmtime(time.mktime(time.strptime(pkey, '%Y-%m-%d-%H-%M-%S'))))
|
||||
epoch_start = calendar.timegm(time.strptime(pkey, '%Y-%m-%d-%H-%M-%S'))
|
||||
|
||||
#Return the time as a floating point number expressed in seconds since the epoch, in UTC.
|
||||
epoch_now = time.time()
|
||||
|
|
Loading…
Reference in New Issue