smarty template engine
Sunday, March 21, 2010  
download | documentation | faq | forum | mailing lists | changelog | contribs 


Translate this page to:
search for in the


{$smarty.now}

The current timestamp can be accessed with {$smarty.now}. The number reflects the number of seconds passed since the so-called Epoch (January 1, 1970) and can be passed directly to date_format modifier for display purposes.

Example 4-7. using {$smarty.now}

{* use the date_format modifier to show current date and time *}
{$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"}


[advertise]


credits 

Smarty Copyright © 2002-2008
New Digital Group, Inc.

All rights reserved.