fix date validation for adif export
这个提交包含在:
父节点
5d2ca03410
当前提交
516d60c4db
共有 1 个文件被更改,包括 2 次插入 和 2 次删除
|
|
@ -82,12 +82,12 @@ class adif_data extends CI_Model {
|
|||
$this->db->where($this->config->item('table_name').'.station_id', $station_id);
|
||||
|
||||
// If date is set, we format the date and add it to the where-statement
|
||||
if ($from != 0) {
|
||||
if ($from) {
|
||||
$from = DateTime::createFromFormat('d/m/Y', $from);
|
||||
$from = $from->format('Y-m-d');
|
||||
$this->db->where("date(".$this->config->item('table_name').".COL_TIME_ON) >= '".$from."'");
|
||||
}
|
||||
if ($to != 0) {
|
||||
if ($to) {
|
||||
$to = DateTime::createFromFormat('d/m/Y', $to);
|
||||
$to = $to->format('Y-m-d');
|
||||
$this->db->where("date(".$this->config->item('table_name').".COL_TIME_ON) <= '".$to."'");
|
||||
|
|
|
|||
正在加载…
在新工单中引用