[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

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


Closed Thread
 
LinkBack Thread Tools
Old 05-18-2005, 09:20 PM   #1 (permalink)
bdd
NamePros Member
 
bdd's Avatar
 
Join Date: Oct 2004
Posts: 44
615.00 NP$ (Donate)

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-18-2005, 11:47 PM   #2 (permalink)
Senior Member
 
Peter's Avatar
 
Join Date: Nov 2003
Location: Scotland
Posts: 4,900
0.60 NP$ (Donate)

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, 07:54 AM   #3 (permalink)
A Wealth of Knowledge
 
stscac's Avatar
 
Join Date: Aug 2004
Posts: 3,794
47.60 NP$ (Donate)

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, 09:53 AM   #4 (permalink)
NamePros Member
 
hozt's Avatar
 
Join Date: May 2005
Posts: 155
451.01 NP$ (Donate)

hozt 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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

Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 10:05 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85