This is a table, it has a field named register_date which is automatically added by DB as a TimeStamp.

I want to show this field as a Persian DateTime. like this image below:
and here is my php piece of code:
<?php
$q = "SELECT * from `tbl_registers2`";
$result = $db->query($q);
$row = 1;
while ($fields = $result->fetch_assoc()) {
?>
<tr data-id="<?= $fields['id']; ?>">
<td><?= $row++; ?></td>
<td><?= $fields['first_name']; ?></td>
<td><?= $fields['last_name']; ?></td>
<td><?= $fields['mobile']; ?></td>
<td><?= $fields['email']; ?></td>
<td><?= $fields['register_date']; ?></td>
<td><img class="delete" src="../assets/img/trash.png"></td>
<td>
<a href="edit.php?id=<?= $fields['id']; ?>">edit</a>
</td>
</tr>
<?php
}
?>
how to do this?

I've found the solution myself after 3 hours.
the solution is to use the
IntlDateFormatterclass of PHP like this:createfromformatfromdatetimeclass is used to convert a plain date string which is read from database to a datetime object. after all,$formatter->format($dateTime);shows the results.to use
IntlDateFormatterclass,extension=php_intl.dllmust be placed in thephp.ini.