Q on Date Package...

From: Date: Tue, 05 Aug 2003 05:59:25 +0000
Subject: Q on Date Package...
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-19266@lists.php.net to get a copy of this message
Can someone tell me how I am doing this wrong? I think I just mis-understand waht I need to do here. Below is a little scsript I made to test a theory. Thanks walter ====== # Load PEAR Package require_once("Date.php"); # instantiate new Date Object $myDate = new Date(); # pull out 'DATE_FORMAT_UNIXTIME' # long int, seconds since the unix epoch $epochTime = time(); # show me... echo $epochTime . '<p>'; # instantiate new Date Object with $epochTime $epochDate = new Date( $epochTime ); # show what it thinks it got... echo 'Date Object: ' . $myDate->getDay() . '/' . $myDate->getMonth() . '/' . $myDate->getYear() . '<p>'; echo 'Epoch Object: ' . $epochDate->getDay() . '/' . $epochDate->getMonth() . '/' . $epochDate->getYear() . '<p>'; echo '<p>'; echo 'they should be the same! But they are not on mine!';

« previous php.pear.dev (#19266) next »