Add support for user defined locale and timezone in date/time prints, remove deprecated PHP strftime

This commit is contained in:
leosw
2022-02-01 21:13:27 +01:00
parent 3a497bbb64
commit 7ec61dbc63
7 changed files with 26 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 strftime('%d/%m/%Y %H:%M:%S',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,strtotime($row->update_date)) ?></option>
<? $i++;
} ?>
</select>
@@ -38,7 +38,7 @@
<?=$wikiPage->content_html?>
</div>
<p id="wikiTimestamp">Page mise à jour le <? echo strftime('%e %B %G, %kh%Mm%Ss',strtotime($wikiPage->update_date)) ?> <small><abbr title="Temps Universel Coordonné">UTC</abbr></small></p>
<p id="wikiTimestamp">Page mise à jour le <? echo datefmt_format($user->datetime_format,strtotime($wikiPage->update_date)) ?></p>
<div style="clear: both;"> </div>
</section>