A quick look at formatting minutes
| From: | eclectic02002 at yahoo dot de | Date: | Wed, 21 Aug 2002 13:05:05 +0000 |
| Subject: | A quick look at formatting minutes | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-5792@lists.php.net to get a copy of this message | ||
Hi;
This is a quick one:
Interestingly the output of The compiletime gives me the month instead
of the minutes:
{tplheader}
<?php
/*
* Smarty plugin
* -------------------------------------------------------------
* File: compiler.tplheader.php
* Type: compiler
* Name: tplheader
* Purpose: Output header containing the source file name and
* the time it was compiled.
* -------------------------------------------------------------
*/
function smarty_compiler_tplheader($tag_arg, &$smarty)
{
return "\necho '" . $smarty->_current_file . " compiled at " .
date('d-m-Y H : M'). "';";
}
?>
Produces this wrong output:
21-08-2002 14 : Aug
Instead:
21-08-2002 14 : 50
I looked up in the manual but didn't find another way of formatting
minutes
Strange enough outputting the current time works:
now: {$smarty.now|date_format:"%d-%m-%Y %H:%M:%S"}
Thanks,
John Walddorf