I suspect you are using an old version of Template::Toolkit.  The 
current version is 2.20.  Template::Plugin::Date in previous 
distributions did not accept the "yyyy-mm-dd hh:mm:ss" format.

 From the Changelog:

* Applied patch from Ronald J Kimball to make Template::Plugin::Date
   accept dates with the year coming first.
   http://lists.tt2.org/pipermail/templates/2007-July/009540.html

:)

Ronald


David Stewart wrote:
> I'm trying to use the Date plugin, but I'm getting some odd behavior.   
> It won't properly parse dates passed in the "yyyy-mm-dd hh:mm:ss"  
> format.  When I use this example from the website documentation ( 
> http://template-toolkit.org/docs/modules/Template/Plugin/Date.html 
>   ):
> 
> [% date.format('2000/12/21 4:20:36') %]
> 
> I get this:
> 
> 08:12:21 28-Oct-37
> 
> If I use the format "hh:mm:ss dd/mm/yyyy" it works fine, but I'm  
> pulling the dates from a MySQL database and it doesn't make sense to  
> reformat all the dates before sending them into the date plugin.
> 
> Anyone have any idea what might be going on here?
> 

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to