Webmaster Forum


Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 12-31-2005, 07:41 PM
Jack F's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 12-07-05
Location: Smallville.ca
Posts: 234
iTrader: 0 / 0%
The wrong time and date

I'm a real newb to this, but I'm a quick learner. This is from a site I bought as a whole.

I own a site and in the statistics its always 3 weeks and some hours behind.

in the statistics.php it points me to the stats.php and in that file the script is such:

Code:
<? $totalsize=0; function show_dir($dir, $pos=2){ global $totalsize; if($pos == 2) $handle = @opendir($dir); while ($file = @readdir ($handle)){ if (eregi("^\.{1,2}$",$file)) continue; if (is_dir($dir.$file)) { show_dir("$dir.$file/", $pos+3); } else { if ((substr($file,-4) != "html") && (substr($file,-3) != "php")) { $size=filesize($dir.$file); $totalsize=$totalsize+$size; } } } @closedir($handle); if($pos == 2) return($totalsize); } $totalsize = show_dir("{$drr}uploads/"); $filecount = 0; $path = "{$drr}uploads/"; if ($handle = opendir($path)) { while (false!== ($file = readdir($handle))) { if (!is_dir($path. $file) && (substr($file,-4) != "html") && (substr($file,-3) != "php")) { $filecount++; } } closedir($handle); } function LoadFiles($dir) { $Files = array(); $It = opendir($dir); if (! $It) die('Cannot list files for ' . $dir); while ($Filename = readdir($It)) { if ($Filename == '.' || $Filename == '..') continue; $LastModified = filemtime($dir . $Filename); $Files[] = array($dir .$Filename, $LastModified); } return $Files; } function DateCmp($a, $b) { return ($a[1] < $b[1]) ? -1 : 0; } function SortByDate(&$Files) { usort($Files, 'DateCmp'); } $Files = LoadFiles("{$drr}uploads/"); SortByDate($Files); $lastfile = date("F j, Y, g:i a", $Files[0][1]); $totalsize = round($totalsize/1024); $totalsize .= "KB"; ?>
Am I looking in the right place ? And if so does anyone see something I'm missing ?

Thanks in advance for anyones time in this.

Last edited by Jack F; 12-31-2005 at 07:58 PM.
 
Reply With Quote
  #2 (permalink)  
Old 12-31-2005, 07:51 PM
kwvarga's Avatar
v7n Mentor
 
Join Date: 10-13-03
Location: Tuscaloosa, AL or Atlanta
Posts: 2,527
iTrader: 0 / 0%
Edit and use [code] tags around code
 
Reply With Quote
  #3 (permalink)  
Old 12-31-2005, 07:59 PM
Jack F's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 12-07-05
Location: Smallville.ca
Posts: 234
iTrader: 0 / 0%
Quote:
Originally Posted by m3lt
Edit and use [code] tags around code
Now that's cool. Thanks.
 
Reply With Quote
  #4 (permalink)  
Old 12-31-2005, 08:23 PM
Michael Allison's Avatar
Senior Member
Latest Blog:
None

 
Join Date: 12-08-05
Location: Spokane, WA
Posts: 750
iTrader: 0 / 0%
I'm guessing it's using your server's time and that time needs to be reset.

-Michael
__________________
As you simplify your life, the laws of the universe will be simpler; solitude will not be solitude, poverty will not be poverty, nor weakness weakness.

-Henry David Thoreau
 
Reply With Quote
  #5 (permalink)  
Old 12-31-2005, 08:27 PM
Jack F's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 12-07-05
Location: Smallville.ca
Posts: 234
iTrader: 0 / 0%
Quote:
Originally Posted by Michael Allison
I'm guessing it's using your server's time and that time needs to be reset.

-Michael
You probably hit the nail dead on with that one. I'll let you know tomorrow when I move the site to my regular host. The sites so new to me it's still on its old owners host.
 
Reply With Quote
  #6 (permalink)  
Old 12-31-2005, 09:35 PM
kwvarga's Avatar
v7n Mentor
 
Join Date: 10-13-03
Location: Tuscaloosa, AL or Atlanta
Posts: 2,527
iTrader: 0 / 0%
Yeah, other than timezone issues, the time issue is a server problem usually.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


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

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 Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrong Traffic, Wrong Keyword for Wrong Site! Jonathan_Hue SEO Forum 22 03-18-2008 05:33 PM
changing content by time/date??? Dino Coding Forum 5 02-12-2008 12:12 AM
Time and date post on blogger rpbu.com Blogging Forum 4 01-15-2008 04:39 PM
Need help with date/time problem memberhits Coding Forum 0 07-02-2006 01:42 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 01:00 PM.
Powered by vBulletin
Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.