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

Your name:

Reply:


Posted by Richard Davey on 10/07/05 22:30

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация