[pLog-svn] r3246 - plog/trunk/class/data

pwestbro at devel.lifetype.net pwestbro at devel.lifetype.net
Fri Apr 14 04:44:50 GMT 2006


Author: pwestbro
Date: 2006-04-14 04:44:48 +0000 (Fri, 14 Apr 2006)
New Revision: 3246

Modified:
   plog/trunk/class/data/htmlcalendar.class.php
Log:
Fixed a problem where the current date in the calendar doesn't take into account the timezone offset.

Modified: plog/trunk/class/data/htmlcalendar.class.php
===================================================================
--- plog/trunk/class/data/htmlcalendar.class.php	2006-04-12 20:45:15 UTC (rev 3245)
+++ plog/trunk/class/data/htmlcalendar.class.php	2006-04-14 04:44:48 UTC (rev 3246)
@@ -234,7 +234,7 @@
     /**
      * Generate the HTML for a given month
      */
-    function getMonthHTML($m, $y, $showYear = 1)
+    function getMonthHTML($m, $y, $showYear = 1, $timestamp = 0)
     {
         $s = "";
 
@@ -297,7 +297,14 @@
     	}
 
         // Make sure we know when today is, so that we can use a different CSS style
-        $today = getdate(time());
+        if ( $timestamp == 0 )
+        {
+            $today = getdate(time());
+        } 
+        else
+        {
+            $today = getdate($timestamp);
+        }
 
     	while ($d <= $daysInMonth)
     	{



More information about the pLog-svn mailing list