Yeah, I figured I could do that if I exhausted all my other options, I was hoping there would be a cleaner solution though. I'd like to not massage the time like that if I can avoid it.
Thanks for the tip though. Tim On Tue, Jan 6, 2009 at 1:55 PM, PHPScriptor <[email protected]> wrote: > > try to add seconds then it works: > > $expireTime = "01:30:00 AM"; > $date->setTime($expireTime, 'hh:mm:ss'); > > > Tim Rupp wrote: >> >> 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 >> >> > > > ----- > visit my website at http://www.phpscriptor.com/ http://www.phpscriptor.com/ > -- > View this message in context: > http://www.nabble.com/zend_date-settime-question-tp21317298p21317765.html > Sent from the Zend Framework mailing list archive at Nabble.com. > >
