Forums / General / maketime seem streng
Coulibaly Ibrahim
Friday 30 March 2007 7:01:33 am
i have an URL like this:domain.name.com/siteaccess/home/(my_day)/31/(my_month)/03/(my_year)/2007
and i want to get the UNIX timestamp of the "date" in this url.i tried this code:
{def $currentDate=maketime(0,0,0,$view_parameters.my_day,$view_parameters.my_month,$view_parameters.my_year)}
that code return a strenge date like "2009/03/07"so i tried something like
{maketime(0,0,0,31,03,2007)}
allway strenge :( can someone explain why? please ;)
Damien Pobel
Friday 30 March 2007 12:10:43 pm
You've swapped month and day. See doc [1]if you don't have time values, you can use makedate [2]
[1] http://ez.no/doc/ez_publish/technical_manual/3_8/reference/template_operators/miscellaneous/maketime[2] http://ez.no/doc/ez_publish/technical_manual/3_8/reference/template_operators/miscellaneous/makedate
Damien Planet eZ Publish.fr : http://www.planet-ezpublish.fr Certification : http://auth.ez.no/certification/verify/372448 Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish
Monday 02 April 2007 1:16:57 am
thanks a lot Damien.
the exemple on the http://ez.no/doc/ez_publish/technical_manual/3_8/reference/template_operators/miscellaneous/maketime page seems wrong. i should read ".... 5th April 200." but it's writen "4th of May ...."Thank you ;)