Re[2]: [PHP] date comparisions...

From: Date: Fri, 07 Oct 2005 19:30:05 +0000
Subject: Re[2]: [PHP] date comparisions...
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-223743@lists.php.net to get a copy of this message
Hi, Friday, October 7, 2005, 7:55:45 PM, you wrote: > dateexpired is: 1128052800 which translates into: 2005-09-30 00:00:00 > Basically, I'm just trying to figure out when the dateexpired is. IF > it is past the current date then I am erroring out and if it's under > the current date... I'm allowing the transaction. > I would assume the following: > if (2005-09-30 00:00:00 > 2005-10-07 00:00:00) > it should error out, no? Not given your logic above, no. You said "If it is past the current date then I am erroring out", therefore 2005-09-30 00:00:00 > 2005-10-07 00:00:00 will NEVER error out, because it will never be greater than the current timestamp in seconds. A = 2005-09-03 = 1,128,052,800 B = 2005-10-07 = 1,128,713,278 (approx, that's actually the value now) So A will never be greater than B, hence you're always allowing the transaction. Cheers, Rich -- Zend Certified Engineer http://www.launchcode.co.uk

« previous php.general (#223743) next »