I’m trying to get the publication date and update date from the database and what appears to me is a correct date but the hour and minutes are incorrect.
my code:
<?php if (mysqli_num_rows($articles) > 0):?>
<table class="comparison_table_admin">
<tr><th>מזהה</th><th class="without_filtering_admin">תמונה ממוזערת</th><th>כותרת</th><th>קטגוריה</th><th>צפיות</th><th>תאריך העלאה</th><th>עדכון אחרון</th>
<?php if(isset($_SESSION['user_is_admin'])):?><th>משתמש</th><?php endif ?>
<th>מצב</th><th class="without_filtering_admin">פתיחה</th><th class="without_filtering_admin">עריכה</th><th class="without_filtering_admin">מחיקה</th></tr>
<tbody class="tbody_in_table_admin" id="search_table">
<?php while($post = mysqli_fetch_assoc($articles)):?>
<?php
$tag_id = $post['tag_id'];
$category_query = "SELECT title FROM categories WHERE id=$tag_id";
$category_result = mysqli_query($connect_db, $category_query);
$category = mysqli_fetch_assoc($category_result);
?>
<tr>
<td><?= $post['id'] ?></td>
<td><img src="/images/<?= $post['thumbnail']?>" alt="<?= $post['title'] ?>"></td>
<td><?= $post['title'] ?></td>
<td><?= $category['title'] ?></td>
<td><?= $post['total_views'] ?></td>
<td data-sort="<?= $post['date_time'] ?>"><?= date("d/m/Y h:m:s",strtotime($post['date_time'])); ?></td>
<td data-sort="<?= $post['update_date_time'] ?>"><?= date("d/m/Y h:m:s",strtotime($post['update_date_time'])); ?></td>
<?php if(isset($_SESSION['user_is_admin'])):?>
<?php $author_id=$post['author_id'];$author_query="SELECT * FROM authors WHERE id=$author_id";$author_result=mysqli_query($connect_db,$author_query);$author=mysqli_fetch_assoc($author_result); ?>
<td><?php echo $author['full_name']?></td>
<?php endif ?>
<td>
<?php if($post['activated']==0){echo'<span class="public_situation_admin" title="המאמר ממתין לאישור המנהל">⏳</span>';}elseif($post['activated']==1){echo'<span class="public_situation_admin" title="המאמר אושר ופורסם">📢</span>';}?>
</td>
<td><a class="new_window_admin" href="/page/<?= $post['id'] ?>/" title="פתיחה בחלון חדש" target="_blank">⇱</a></td>
<td><a class="edit_button_admin" href="/admin/edit-post.php?id=<?= $post['id'] ?>">✎</a></td>
<td>
<form action="/admin/delete-post.php?id=<?= $post['id'] ?>" method="post">
<input type="hidden" name="delete_articles" id="delete_articles" value="<?= $post['id'] ?>">
<button class="delete_button_admin" type="submit" onclick="archiveFunction()">🗑</button>
</form>
</td>
</tr>
<?php endwhile ?>
</tbody>
</table>
<?php else:?><h2 class="system_notice_h2_admin"><?= "לא פרסמת שום מאמר."?></h2><?php endif?>
This is the code snippet that displays the dates:
<td data-sort="<?= $post['date_time'] ?>"><?= date("d/m/Y h:m:s",strtotime($post['date_time'])) ; ?></td>
<td data-sort="<?= $post['update_date_time'] ?>"><?= date("d/m/Y h:m:s",strtotime($post['update_date_time'])) ; ?></td>

