Re: [SMARTY-DEV] html_select_date bug - maybe ?

From: Date: Wed, 10 Dec 2003 17:21:32 +0000
Subject: Re: [SMARTY-DEV] html_select_date bug - maybe ?
References: 1 2  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1962@lists.php.net to get a copy of this message
to my knowledge it uses smarty_make_timestamp which uses strottime *only* when no time-attribute in the format "YYYY-MM-DD" is given. so if you pass a time-attribute in the correct format it should work fine for dates before 1970. that's what my tests tell me. greetings messju On Wed, Dec 10, 2003 at 11:14:22AM -0600, Monte Ohrt wrote: > It uses strtotime(), so only 1970-2038 dates work correctly. It wouldn't > be so difficult to create a replacement plugin that uses Date_Calc from > PEAR, which is consequently a library I contributed some time back. :) > > Monte > > On Wed, 2003-12-10 at 10:13, pete M wrote: > > smarty 2.5.0 > > > > I'm using html_select_date to enter peoples birth dates in my application. > > > > I understand the problem with epoch time and have used the format > > 'yyyy-mm-dd' to store in database/variable/etc and using a modified > > version of 'date_format' to present the date. > > > > However 'html_select_date' gives spurious date/month values pre 1970's > > > > eg giving 1945-02-01 to html_select_date displays 1945-01-01 > > > > Indeed anything pre 1970's seems to give spurios errors with the date or > > month values (year seems to be correct) > > > > Is this because the timestamp is not handled correctly or should I not > > be using html_select_date for pre 1970 ?? > > > > Hope it makes sense > > > > tia > > > > Pete > > -- > Smarty Development Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.smarty.dev (#1962) next »