From: <mo...@us...> - 2007-02-04 21:38:41
|
Update of /cvsroot/tikiwiki/tiki/lib/stats In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv12165/lib/stats Modified Files: statslib.php Log Message: [MOD] timezones: rollback of last commit about timezones. Idea is good but spreading timestamp manipulation makes erratic border effects and makes impossible to display timezone properly with date functions. Please hold commits for some hours, calendar rolledback code will be committed back, as well as some other parts, as there were some nice fixes anyway Index: statslib.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/lib/stats/statslib.php,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- statslib.php 3 Feb 2007 20:47:35 -0000 1.27 +++ statslib.php 4 Feb 2007 20:09:43 -0000 1.28 @@ -277,7 +277,7 @@ $result=false; return $result; } - $dayzero = gmmktime(0, 0, 0, gmdate("m"), date("d"), date("Y")); + $dayzero = mktime(0, 0, 0, date("m"), date("d"), date("Y")); if (!is_null($id)) { $object=$id."?".$object; } @@ -295,7 +295,7 @@ function best_overall_object_stats($max=20,$days=0) { $stats = array(); if ($days!=0) { - $mid="WHERE `day` >= ".gmmktime(0, 0, 0, gmdate("m"), date("d")-$days, date("Y"))." "; + $mid="WHERE `day` >= ".mktime(0, 0, 0, date("m"), date("d")-$days, date("Y"))." "; } else { $mid=""; } @@ -318,7 +318,7 @@ function object_hits($object,$type,$days=0) { if ($days!=0) { - $mid="AND `day` >= ".gmmktime(0, 0, 0, gmdate("m"), date("d")-$days, date("Y"))." "; + $mid="AND `day` >= ".mktime(0, 0, 0, date("m"), date("d")-$days, date("Y"))." "; } else { $mid=""; } @@ -329,7 +329,7 @@ function get_daily_usage_chart_data($days=30) { if ($days!=0) { - $mid="WHERE `day` >= ".gmmktime(0, 0, 0, gmdate("m"), date("d")-$days, date("Y"))." "; + $mid="WHERE `day` >= ".mktime(0, 0, 0, date("m"), date("d")-$days, date("Y"))." "; } else { $mid=""; } @@ -337,7 +337,7 @@ $result = $this->query($query,array(),-1,0); $data=array(); while ($res = $result->fetchRow()) { - $data['xdata'][]=gmdate("Y/m/d",$res['day']); + $data['xdata'][]=date("Y/m/d",$res['day']); $data['ydata'][]=$res['hits']; } return $data; |