Date validation in the Issue model
This commit is contained in:
parent
2bd2b3a463
commit
fde3a0a949
@ -161,11 +161,9 @@ class IDF_Issue extends Pluf_Model
|
||||
if ($this->id == '') {
|
||||
$this->creation_dtime = gmdate('Y-m-d H:i:s');
|
||||
}
|
||||
if($this->due_dtime and !empty($this->due_dtime)) {
|
||||
$datetime = $this->due_dtime . ' 23:59:59';
|
||||
if(date('Y-m-d', strtotime($datetime)) === $this->due_dtime) {
|
||||
$this->due_dtime = $datetime;
|
||||
}
|
||||
if ($this->due_dtime and !empty($this->due_dtime)) {
|
||||
$this->due_dtime = date('Y-m-d 23:59:59',
|
||||
strtotime($this->due_dtime));
|
||||
}
|
||||
$this->modif_dtime = gmdate('Y-m-d H:i:s');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user