Re: Adding ctime=0

Petko Yotov <[email protected]> Thu, 06 Feb 2025 09:21:04 +0100
Newsgroups gmane.comp.web.wiki.pmwiki.user
Message-ID <[email protected]>
On 06/02/2025 08:37, Martin Cuno wrote:
> Because no variable is provided for ctime by default (but why not,
> analogous to $LastModified ?), I wrote:
> 
> $FmtPV['$Createdcuno'] = 'date("d.m.Y-H:i", $page["ctime"])';

Change this to 'date("d.m.Y-H:i", intval($page["ctime"]))'; that is 
added intval(), to have the date to 1970.

> What do you mean by "customisation" of ctime?

Exactly the above.

> If ctime isn't there, the current time is shown for me. If ctime=0, on
> the other hand, 1/1/1970 is shown. I would prefer the second one, and,
> as I said, I would like the files to be "complete".

The above change will make it show 1/1/1970 if ctime isn't there.

Must you absolutely have a ctime= attribute for reasons other than 
displaying the 1970 date?

Petko