Re: [SMARTY-DEV] html_select_date bug - maybe ?
| From: | Monte Ohrt | Date: | Wed, 10 Dec 2003 17:14:22 +0000 |
| Subject: | Re: [SMARTY-DEV] html_select_date bug - maybe ? | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1961@lists.php.net to get a copy of this message | ||
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