update data to device
This commit is contained in:
@@ -150,6 +150,17 @@ class Schedule extends \yii\db\ActiveRecord {
|
||||
return hexdec("0" . $front . "0" . $back);
|
||||
}
|
||||
|
||||
public static function convertTimeAttr($attr) {
|
||||
$temp = explode("-", $attr);
|
||||
$from = $temp[0];
|
||||
$to = $temp[1];
|
||||
$fTemp = explode(":", $from);
|
||||
$front = dechex(intval($fTemp[0]) * 100 + intval($fTemp[1]));
|
||||
$tTemp = explode(":", $to);
|
||||
$back = dechex(intval($tTemp[0]) * 100 + intval($tTemp[1]));
|
||||
return hexdec("0" . $front . "0" . $back);
|
||||
}
|
||||
|
||||
public static function scheduleArray() {
|
||||
$lists = self::find()->all();
|
||||
$results = [];
|
||||
|
||||
Reference in New Issue
Block a user