fix date validation for adif export

这个提交包含在:
Matt Melling 2022-12-23 12:55:58 +00:00
父节点 5d2ca03410
当前提交 516d60c4db
找不到此签名对应的密钥
GPG 密钥 ID: 92FC861888D08853

查看文件

@ -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."'");