[pmwiki-users] {(...)} markup recipe available
Patrick R. Michaud
pmichaud at pobox.com
Mon Apr 16 09:51:36 CDT 2007
On Mon, Apr 16, 2007 at 10:28:38AM -0400, The Editor wrote:
> > Monday, April 16, 2007, 3:06:59 PM, The wrote:
> > > I spent hours debugging my code only to discover the problem was
> > > there. I never could find out how to do it, so added my own {(time)}
> > > extension to produce a timestamp. Did I miss something? I tried the
> > > %s thing but no luck. It's also not on the php documentation page.
Oops, I forgot that some system libraries don't provide the
%s conversion. Very sorry about that. Now fixed in
2.2.0-beta44 (just released).
> I've been using the {(time)} markup, now changed to {(ftime)} by Pm.
> But can no longer get it to produce a pure timestamp. Wish that had
> been the default.
Putting on the "advocate for non-programmers" hat for a moment,
pure timestamps are totally cryptic to non-programmers, which is
why they're not the default. Almost _anything_ else is better
as a default for time formatting than Unix timestamps.
> I thought Pm said somewhere {(ftime %s)} would
> produce a timestamp, but didn't really test it out--only after several
> hours debugging code did I finally discover where the problem was.
Sorry about that. It does produce a timestamp on my systems --
I just forgot that not all PHP libraries are the same.
> Still, would prefer to not have to do a separate markup.
There's always:
$FmtPV['$Now'] = $Now;
Pm
More information about the pmwiki-users
mailing list