[thelist] PHP Date question

Casey Crookston caseyc at IntelliSoftmn.com
Wed Dec 13 09:39:08 CST 2006

I'm de-bugging an app I didn't code.  On a report, two date variables
are set as follows:


$this->Search->Fields["DateStart"]->Value .= " 12:00:00 AM";

$this->Search->Fields["DateEnd"]->Value .= " 11:59:59 PM";


So, the data for the report runs from 12:00:00 AM on the start date
selected by the user to 11:59:59 on the end date selected by the user.
Trouble is, their bank/merchant account is several time zones off.  We
need to adjust the times to run from 8:00:00 PM of the PREVIOUS DAY (one
day before the user selects as the start date) to 7:59:59 PM of the end
date.  Setting the end time to 7:59:59 is simple enough, but I'm not
sure how to adjust the start date back one day.


Something like:


$date-> Fields["DateStart"]->modify("-1 day");


But that doesn't work.  I'm sure it's simple, but I know nothing about
PHP. Thanks,



More information about the thelist mailing list