PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_QuickForm » Bug #1830

HTML_QuickForm_date: Problems with dates prior to 1970-01-01

Details

Submitted2004-07-09 07:45 UTC
Fromktd at palex dot ru
StatusBogus
PackageHTML_QuickForm
PHP Version4.3.4
OSWindows XP SP1
Roadmaps(Not assigned)

Comments

[2004-07-09 07:45 UTC] ktd at palex dot ru

Description:
------------
I see this warning using HTML_QuickForm-3.2.2:

Warning: date(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in
d:\www\pear\HTML\QuickForm\date.php on line 376

then trying to call $form->setDefaults("birthday", "1945-05-01");

But I don't see this warning on FreeBSD or Linux based platforms.

Reproduce code:
---------------
$birthday = &$form->addElement("date", "birthday", "Birthday:", array(
"language" => "en",
"format" => "Y m d",
'minYear' => 1900,
'maxYear' => 2010));

$form->setDefaults(array(
"birthday" => $user->birthday,
));

then $user->birthday = "1945-05-01";

Expected result:
----------------
Similar to unix-like based platforms behavior.

Actual result:
--------------
Warning: date(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in d:\www\pear\HTML\QuickForm\date.php on line 376

this string in date.php even commented:
//might be a unix epoch, then we fill all possible values
;-)

[2004-07-10 07:28 UTC] ktd at palex dot ru

Does this issue mean what QuickForm can not be used fully under windows based platforms ? (