[pmwiki-users] time zone for $LastModified

Piotr A. Dybczyński piotr at dybczynski.pl
Mon Nov 25 11:35:26 PST 2024


Hi,

I have modified local/config.php according to your suggestion and it 
works perfectly,

Thanks,
Piotr
-- 
/***********************************************************************
                          dr Piotr A. Dybczyński
  homepage: https://www.dybczynski.pl/Piotr   e-mail: piotr at dybczynski.pl
******************************************************************PAD***/

W dniu 25.11.2024o 13:27, Petko Yotov pisze:
> 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