cc-2683: not using utc time
-fix install script inputting timezone preference even if it already existed
This commit is contained in:
parent
8aa26b2eb0
commit
0a11160298
|
@ -452,13 +452,13 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
array_push($days, $showDay->getDbDay());
|
array_push($days, $showDay->getDbDay());
|
||||||
}
|
}
|
||||||
|
|
||||||
$displayedEndDate = new DateTime($show->getRepeatingEndDate());
|
$displayedEndDate = new DateTime($show->getRepeatingEndDate(), new DateTimeZone("UTC"));
|
||||||
$displayedEndDate->sub(new DateInterval("P1D"));//end dates are stored non-inclusively.
|
$displayedEndDate->sub(new DateInterval("P1D"));//end dates are stored non-inclusively.
|
||||||
$displayedEndDate = $displayedEndDate->format("Y-m-d");
|
$displayedEndDate->setTimezone(new DateTimeZone(date_default_timezone_get()));
|
||||||
|
|
||||||
$formRepeats->populate(array('add_show_repeat_type' => $show->getRepeatType(),
|
$formRepeats->populate(array('add_show_repeat_type' => $show->getRepeatType(),
|
||||||
'add_show_day_check' => $days,
|
'add_show_day_check' => $days,
|
||||||
'add_show_end_date' => $displayedEndDate,
|
'add_show_end_date' => $displayedEndDate->format("Y-m-d"),
|
||||||
'add_show_no_end' => ($show->getRepeatingEndDate() == '')));
|
'add_show_no_end' => ($show->getRepeatingEndDate() == '')));
|
||||||
|
|
||||||
$formRecord->populate(array('add_show_record' => $show->isRecorded(),
|
$formRecord->populate(array('add_show_record' => $show->isRecorded(),
|
||||||
|
|
|
@ -50,20 +50,20 @@ AirtimeInstall::SetAirtimeVersion(AIRTIME_VERSION);
|
||||||
// set up some keys in DB
|
// set up some keys in DB
|
||||||
AirtimeInstall::SetUniqueId();
|
AirtimeInstall::SetUniqueId();
|
||||||
AirtimeInstall::SetImportTimestamp();
|
AirtimeInstall::SetImportTimestamp();
|
||||||
AirtimeInstall::SetDefaultTimezone();
|
|
||||||
|
|
||||||
if (AirtimeInstall::$databaseTablesCreated) {
|
if (AirtimeInstall::$databaseTablesCreated) {
|
||||||
|
AirtimeInstall::SetDefaultTimezone();
|
||||||
|
|
||||||
$ini = parse_ini_file(__DIR__."/airtime-install.ini");
|
$ini = parse_ini_file(__DIR__."/airtime-install.ini");
|
||||||
|
|
||||||
$stor_dir = realpath($ini["storage_dir"])."/";
|
|
||||||
echo "* Inserting stor directory location $stor_dir into music_dirs table".PHP_EOL;
|
|
||||||
|
|
||||||
$sql = "INSERT INTO cc_music_dirs (directory, type) VALUES ('$stor_dir', 'stor')";
|
$stor_dir = realpath($ini["storage_dir"])."/";
|
||||||
$result = $CC_DBC->query($sql);
|
echo "* Inserting stor directory location $stor_dir into music_dirs table".PHP_EOL;
|
||||||
if (PEAR::isError($result)) {
|
|
||||||
echo "* Failed inserting {$stor_dir} in cc_music_dirs".PHP_EOL;
|
$sql = "INSERT INTO cc_music_dirs (directory, type) VALUES ('$stor_dir', 'stor')";
|
||||||
echo "* Message {$result->getMessage()}".PHP_EOL;
|
$result = $CC_DBC->query($sql);
|
||||||
exit(1);
|
if (PEAR::isError($result)) {
|
||||||
}
|
echo "* Failed inserting {$stor_dir} in cc_music_dirs".PHP_EOL;
|
||||||
|
echo "* Message {$result->getMessage()}".PHP_EOL;
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue