Issue #27 - Changed deltas for CLI from minutes to seconds.

This commit is contained in:
Daniel Thee Roperto
2016-09-19 15:55:57 +10:00
parent f569157368
commit 2670485341
3 changed files with 18 additions and 18 deletions

View File

@@ -139,11 +139,11 @@ class create extends clibase {
$this->becomeadmin();
// Create the outage.
$start = $this->time + ($options['start'] * 60);
$start = $this->time + $options['start'];
$outage = new outage([
'warntime' => $start - ($options['warn'] * 60),
'warntime' => $start - $options['warn'],
'starttime' => $start,
'stoptime' => $start + ($options['duration'] * 60),
'stoptime' => $start + $options['duration'],
'title' => $options['title'],
'description' => $options['description'],
]);
@@ -167,8 +167,8 @@ class create extends clibase {
$outage = outagedb::get_by_id((int)$id);
$this->set_defaults([
'warn' => (int)($outage->get_warning_duration() / 60),
'duration' => (int)($outage->get_duration() / 60),
'warn' => $outage->get_warning_duration(),
'duration' => $outage->get_duration(),
'title' => $outage->title,
'description' => $outage->description,
]);