Added custom date format

This commit is contained in:
Andreas Kristiansen
2025-12-18 20:05:31 +01:00
parent 18e269ac9c
commit 3cf670787e
2 changed files with 13 additions and 2 deletions

View File

@@ -95,7 +95,7 @@
<div>
<h6 class="mb-1"><?= __("Lookup QSOs with missing grid in callbook") ?></h6>
<p class="mb-1 small text-muted"><?= __("Use callbook lookup to set gridsquare") ?></p>
<p class="mb-1 small alert-danger"><?= __("This is limited to 100 callsigns for each run!") ?></p>
<p class="mb-1 small alert-danger"><?= __("This is limited to 250 callsigns for each run!") ?></p>
</div>
<div class="d-flex nowrap">
<button type="button" class="btn btn-sm btn-success me-1 ld-ext-right" id="checkGridsBtn" onclick="checkGrids()">

View File

@@ -1,3 +1,14 @@
<?php
// Get Date format
if($this->session->userdata('user_date_format')) {
// If Logged in and session exists
$custom_date_format = $this->session->userdata('user_date_format');
} else {
// Get Default date format from /config/wavelog.php
$custom_date_format = $this->config->item('qso_date_format');
}
?>
<div class="container-fluid">
<?php if (!empty($qsos) && count($qsos) > 0): ?>
<div class="table-responsive" style="max-height:50vh; overflow:auto;">
@@ -21,7 +32,7 @@
<?php foreach ($qsos as $qso): ?>
<tr>
<td><?php echo '<a id="edit_qso" href="javascript:displayQso(' . $qso->col_primary_key . ')">' . htmlspecialchars($qso->col_call) . '</a>'; ?></td>
<td><?php echo date('Y-m-d H:i', strtotime($qso->col_time_on)); ?></td>
<td><?php $timestamp = strtotime($qso->col_time_on); echo date($custom_date_format . ' H:i', $timestamp); ?></td>
<td><?php echo $qso->col_mode; ?></td>
<td><?php echo $qso->col_band; ?></td>
<td><?php echo $qso->col_state; ?></td>