Skip to content

Commit

Permalink
(status > monitoring) use last update date if end date is larger
Browse files Browse the repository at this point in the history
  • Loading branch information
jdillard committed Jun 7, 2016
1 parent d8cfe96 commit 20bde27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,10 @@

if ($timePeriod === "custom") {

//dates validation
if($end < $start) {
die ('{ "error" : "The start date must come before the end date." }');
} elseif ($end > time()) {
die ('{ "error" : "The end date can\'t be in the future." }');
}
// make sure end time isn't later than last updated time entry
if( $end > $last_updated ) { $end = $last_updated; }

/* ensure resolution intreval */
$resolution = 60; //defaults to highest resolution available
$start = floor($start/$resolution) * $resolution;
$end = floor($end/$resolution) * $resolution;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,6 @@ function getOptions() {
$( "#end-date" ).datepicker({
changeMonth: true,
changeYear: true,
maxDate: new Date
});

function applySettings(defaults) {
Expand Down

0 comments on commit 20bde27

Please sign in to comment.