This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » symfony 1.3 and 1.4 » Error detected in sfValidatorDate
Error detected in sfValidatorDate [message #102649] Sat, 17 July 2010 05:40 Go to next message
alainhl  is currently offline alainhl
Messages: 1
Registered: January 2010
Junior Member
Hello everyone,

On my system I have to record birth dates less than 1902. For dates I am using the widget sfWidgetFormI18nDate and the validator sfValidatorDateTime. When I try to register a person with lower birth date to 1902 I can not because the validator sfValidatorDateTime only supports dates up to 1902. I have reviewed the validator sfValidatorDate class and the problem is at line 177 when calling mktime function, which returns false because the date is less than the year 1902.

My specific questions are:

Is this a bug in symfony to be solved?
How do I register to dates below 1902?

Regards
Re: Error detected in sfValidatorDate [message #102671 is a reply to message #102649 ] Sat, 17 July 2010 19:18 Go to previous message
el-sid  is currently offline el-sid
Messages: 64
Registered: September 2009
Location: Nairobi, Kenya
Member

from the php manual
The number of the year, may be a two or four digit value, with values between 0-69 mapping to 2000-2069 and 70-100 to 1970-2000. On systems where time_t is a 32bit signed integer, as most common today, the valid range for year  is somewhere between 1901 and 2038. However, before PHP 5.1.0 this range was limited from 1970 to 2038 on some systems (e.g. Windows). 



it seems that the mktime is limited for your purposes. You might have to find an alternative
Previous Topic:Autogenerated classes are not generated
Next Topic:forward404Unless() problem
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software