You are here: date() gives me yesterday's date and not today's - why? « PHP Programming Language « IT news, forums, messages
date() gives me yesterday's date and not today's - why?

Posted by comp.lang.php on 10/13/01 11:39

$result[$i]->record_entered contains the current date as set up by
MySQL (entered as "now()").

I verified that in the database the date is "now()", which in this case
will be "2/9/2006".

However, when viewing the page using the display:

[PHP]<?= date('n/j/Y', strtotime($result[0]->record_entered)) ?>[/PHP]

I get "2/8/2006" instead, even though the database back-end says
"2/9/2006". What's going on?

Thanx
Phil

 

Navigation:

[Reply to this 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

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