NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page date function in PHP not working??

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 05-18-2005, 10:20 PM THREAD STARTER               #1 (permalink)
bdd
NamePros Member
 
bdd's Avatar
Join Date: Oct 2004
Posts: 44
bdd is an unknown quantity at this point
 



Caution date function in PHP not working??


hiya ppl i have added the date function into my php page and it doesnt seem to be working correctly... i have done it before with no problems but on this page i have just created it started out working and now after deuploading the files it is displaying yesterday as todays date??? why???

i use this

<?
$today = date("l, d F Y");
?>

and then add the echo $today in my code... and like i said it is displaying a date but it is yesterdays???
__________________
Web and Graphic Design services - http://www.blackdropdesign.com
bdd is offline  
Old 05-19-2005, 12:47 AM   #2 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
the obvious thing is that the server is most likely on a different time zone as you so for the server that is still the date.

Alternatively check that the time and date on the server itself is correct.
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 05-19-2005, 08:54 AM   #3 (permalink)
A Wealth of Knowledge
 
stscac's Avatar
Join Date: Aug 2004
Posts: 3,809
stscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud of
 



can you give us an example of the output of the code and then the current time where you are.

i will be able to help then
stscac is offline  
Old 05-19-2005, 10:53 AM   #4 (permalink)
NamePros Member
 
hozt's Avatar
Join Date: May 2005
Posts: 156
hozt is just really nicehozt is just really nicehozt is just really nicehozt is just really nicehozt is just really nicehozt is just really nicehozt is just really nicehozt is just really nice
 



One way to fix this is to add/subtract the difference in seconds from the system time:

3600 = 1 hour
86400 = 1 day
<?php
echo date("l, d F Y",time()-3600);
?>
hozt is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Googlism - What does google think of you? deadserious The Break Room 55 12-15-2005 10:09 AM
All Domains $10 Filtered Domains For Sale - Fixed Price 8 01-27-2005 09:09 PM
All 52 names 10-50$ Filtered Domains For Sale - Fixed Price 1 01-18-2005 06:26 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 06:19 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger