First support for timezones on date displays

This commit is contained in:
leosw
2022-02-01 22:25:52 +01:00
parent af4103c31c
commit 507bf492a0
7 changed files with 16 additions and 14 deletions

View File

@@ -15,7 +15,7 @@
<select id="wikihistory">
<? $i = 0;
foreach ($wikiHistory->objs as $row) { ?>
<option <?=$row->version_id==$wikiPage->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'&bull; ':''?><? echo datefmt_format($user->datetimeshort_format,strtotime($row->update_date)) ?></option>
<option <?=$row->version_id==$wikiPage->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'&bull; ':''?><? echo datefmt_format($user->datetimeshort_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?></option>
<? $i++;
} ?>
</select>
@@ -38,7 +38,7 @@
<?=$wikiPage->content_html?>
</div>
<p id="wikiTimestamp">Page mise à jour le <? echo datefmt_format($user->datetime_format,strtotime($wikiPage->update_date)) ?></p>
<p id="wikiTimestamp">Page mise à jour le <? echo datefmt_format($user->datetime_format,date_create($wikiPage->update_date, new DateTimeZone("UTC"))) ?></p>
<div style="clear: both;"> </div>
</section>