And you also receive the error when you strip of the complete setTime() call. The exception you mentioned is thrown in a single place... when you call setDate().
And on one single reason... when the given string is 'null'.

Maybe you call this method twice in your code ?

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

----- Original Message ----- From: "Tim Rupp" <[email protected]>
To: <[email protected]>
Sent: Tuesday, January 06, 2009 8:27 PM
Subject: [fw-general] zend_date settime question


Hi list,

I may be going about this the wrong way, so if that's the extent of
the problem, then I'd appreciate some pointers. Btw, I'm using ZF
1.7.2.

I create a zend_date object, use setdate and then try to use settime,
but get an exception message of "parameter $date must be set, null is
not allowed". I looked into it and it appears to stem from my lack of
specifying a number of seconds to settime.

My data is the following

    $expireTime = "01:30 AM";
    $expireDate = "01/06/2009";

I'm then doing this

    $date = new Zend_Date;
    $date->setDate($expireDate);
    $date->setTime($expireTime, 'hh:mm');

And it's choking on the setTime call. Am I just misunderstanding the
use of setTime here? Or is this a bug in Zend_Date or ??? I also
receive the error if I strip off the " AM" part. So specifying seconds
are required? I can't make it default to just zero?

Any help is appreciated.
Thanks,
Tim

Reply via email to