Fix Issues where Dates/Times of QSOs are not well filled

This commit is contained in:
int2001
2024-08-28 12:53:34 +00:00
parent 7fcc128cf5
commit 9b78a24b34

View File

@@ -153,21 +153,25 @@ class AdifHelper {
$line .= $this->getAdifFieldLine("FREQ_RX", $freq_rx_in_mhz);
}
$date_on = strtotime($qso->COL_TIME_ON);
$date_on = date('Ymd', $date_on);
$line .= $this->getAdifFieldLine("QSO_DATE", $date_on);
if (isset($qso->COL_TIME_ON) && (date('YmdHis',strtotime($qso->COL_TIME_ON)) != '-00011130000000')) {
$date_on = strtotime($qso->COL_TIME_ON);
$date_on = date('Ymd', $date_on);
$line .= $this->getAdifFieldLine("QSO_DATE", $date_on);
$time_on = strtotime($qso->COL_TIME_ON);
$time_on = date('His', $time_on);
$line .= $this->getAdifFieldLine("TIME_ON", $time_on);
$time_on = strtotime($qso->COL_TIME_ON);
$time_on = date('His', $time_on);
$line .= $this->getAdifFieldLine("TIME_ON", $time_on);
}
$date_off = strtotime($qso->COL_TIME_OFF);
$date_off = date('Ymd', $date_off);
$line .= $this->getAdifFieldLine("QSO_DATE_OFF", $date_off);
if (isset($qso->COL_TIME_OFF) && (date('YmdHis',strtotime($qso->COL_TIME_OFF)) != '-00011130000000')) {
$date_off = strtotime($qso->COL_TIME_OFF);
$date_off = date('Ymd', $date_off);
$line .= $this->getAdifFieldLine("QSO_DATE_OFF", $date_off);
$time_off = strtotime($qso->COL_TIME_OFF);
$time_off = date('His', $time_off);
$line .= $this->getAdifFieldLine("TIME_OFF", $time_off);
$time_off = strtotime($qso->COL_TIME_OFF);
$time_off = date('His', $time_off);
$line .= $this->getAdifFieldLine("TIME_OFF", $time_off);
}
// "MY" information
$line .= $this->getAdifFieldLine("STATION_CALLSIGN", $qso->station_callsign);