[pmwiki-users] time zone for $LastModified

Petko Yotov 5ko at 5ko.fr
Mon Nov 25 04:27:37 PST 2024


Normally you should be able to set near the top of local/config.php:

   date_default_timezone_set('Europe/Warsaw');

Alternatively, in the pagelist template you can have:

   last modified: {(ftime fmt=%L when=@{=$LastModifiedTime} 
tz=Europe/Warsaw)}

See also $EnableLocalTimes, if enabled, "%L" above will show the 
date/time stamp in the timezone of the visitor.

Petko

On 25/11/2024 12:54, Piotr A. Dybczyński wrote:
> Hi All,
> 
> I edit a page and save it. In another page I have inserted:
> 
> (:pagelist name='here correct page name' fmt=#titlepdlm:)
> 
> The format in Site.LocalTemplates is:
> 
> [[#titlepdlm]]
> (:template defaults order=title:)
> last modified: {=$LastModified}
> 
> [[#titlepdlmend]]
> 
> The problem is that it displays the time of last modification in UTC
> instead of local time of the wiki server (stable Debian, PHP 8.2).
> 
> In the server filesystem the time of wiki page modification is correct.
> 
> How can I force a correct time zone?
> 
> Cheers,
> Piotr



More information about the pmwiki-users mailing list