Skip to content

Commit

Permalink
Closes #5099 - Display current server time in prefs.
Browse files Browse the repository at this point in the history
  • Loading branch information
CaMer0n committed Nov 8, 2023
1 parent eee2ae0 commit e831266
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions e107_admin/prefs.php
Expand Up @@ -823,12 +823,14 @@ function sendTest()
</tr>";

$timeZones = systemTimeZones();
$timez = new DateTimeZone($pref['timezone']);
$datetime = new DateTime('now', $timez); // Get the current date and time

$text .= "
<tr>
<td><label for='timezone'>".PRFLAN_56."</label></td>
<td>
".$frm->select('timezone', $timeZones, vartrue($pref['timezone'], 'UTC'),'size=xlarge')."
<td class='form-inline'>
".$frm->select('timezone', $timeZones, vartrue($pref['timezone'], 'UTC'),'size=xlarge')." <span style='padding-left:10px'>".$datetime->format('Y-m-d H:i:s')."</span>
</td>
</tr>
</tbody>
Expand Down

0 comments on commit e831266

Please sign in to comment.