[pLog-svn] r2984 - in plog/branches/lifetype-1.0.4: . class/locale

pwestbro at devel.lifetype.net pwestbro at devel.lifetype.net
Fri Feb 24 06:13:53 GMT 2006


Author: pwestbro
Date: 2006-02-24 06:13:52 +0000 (Fri, 24 Feb 2006)
New Revision: 2984

Modified:
   plog/branches/lifetype-1.0.4/class/locale/locale.class.php
   plog/branches/lifetype-1.0.4/xmlrpc.php
Log:
Fixed bug http://bugs.lifetype.net/view.php?id=691.  Changed places that built a php timestamp manually to just call getTimestamp(DATE_FORMAT_UNIXTIME);

Modified: plog/branches/lifetype-1.0.4/class/locale/locale.class.php
===================================================================
--- plog/branches/lifetype-1.0.4/class/locale/locale.class.php	2006-02-24 05:56:47 UTC (rev 2983)
+++ plog/branches/lifetype-1.0.4/class/locale/locale.class.php	2006-02-24 06:13:52 UTC (rev 2984)
@@ -498,18 +498,9 @@
             $weekdayId = $timeStamp->getWeekdayId();
             $weekday = $this->_messages["days"][$weekdayId];
             
-            
-            // Get the time stamp string
-            $strTimeStamp = $timeStamp->getTimestamp();
-            //Convert this to a php timestamp.
-            $time = mktime(
-                substr($strTimeStamp,8,2),
-                substr($strTimeStamp,10,2),
-                substr($strTimeStamp,12,2),
-                substr($strTimeStamp,4,2),
-                substr($strTimeStamp,6,2),
-                substr($strTimeStamp,0,4)
-            );
+            include_once( PLOG_CLASS_PATH."class/data/Date.class.php" );
+            // Get the unix time stamp 
+            $time = $timeStamp->getTimestamp(DATE_FORMAT_UNIXTIME);
 
             // Get the time zone offset for the server, on the specified date
             $timeZoneSec = date("Z", $time);
@@ -625,18 +616,9 @@
                     $timeStamp->subtractSeconds( $timeDiff * (-3600));
             
             }
-            // Convert this timestamp to on that is in GMT
-            $strTimeStamp = $timeStamp->getTimestamp();
-            // Now have a local time stamp 
-            // Is this step really necessary, since we previously had a time stamp
-            $time = mktime(
-                substr($strTimeStamp,8,2),
-                substr($strTimeStamp,10,2),
-                substr($strTimeStamp,12,2),
-                substr($strTimeStamp,4,2),
-                substr($strTimeStamp,6,2),
-                substr($strTimeStamp,0,4)
-            );
+            include_once( PLOG_CLASS_PATH."class/data/Date.class.php" );
+            // Get the unix time stamp 
+            $time = $timeStamp->getTimestamp(DATE_FORMAT_UNIXTIME);
 
             // This does not take into account the time offset that the user
             // specified, since we are converting the time to GMT.  Since the

Modified: plog/branches/lifetype-1.0.4/xmlrpc.php
===================================================================
--- plog/branches/lifetype-1.0.4/xmlrpc.php	2006-02-24 05:56:47 UTC (rev 2983)
+++ plog/branches/lifetype-1.0.4/xmlrpc.php	2006-02-24 06:13:52 UTC (rev 2984)
@@ -322,15 +322,9 @@
         {
             $item = $articles->getUserArticle($postid, $erg->_id);
             $dateObject = $item->getDateObject();
-            $time = $dateObject->getTimestamp();
-            $time = mktime(
-                substr($time,8,2),
-                substr($time,10,2),
-                substr($time,12,2),
-                substr($time,4,2),
-                substr($time,6,2),
-                substr($time,0,4)
-            );
+            include_once( PLOG_CLASS_PATH."class/data/Date.class.php" );
+            // Get the unix time stamp 
+            $time = $dateObject->getTimestamp(DATE_FORMAT_UNIXTIME);
 
             $dummy                  = array();
             $dummy["userid"]        = $item->_userInfo->_id;
@@ -363,15 +357,9 @@
         {
             $item = $articles->getUserArticle($postid, $erg->_id);
             $dateObject = $item->getDateObject();
-            $time = $dateObject->getTimestamp();
-            $time = mktime(
-                substr($time,8,2),
-                substr($time,10,2),
-                substr($time,12,2),
-                substr($time,4,2),
-                substr($time,6,2),
-                substr($time,0,4)
-            );
+            include_once( PLOG_CLASS_PATH."class/data/Date.class.php" );
+            // Get the unix time stamp 
+            $time = $dateObject->getTimestamp(DATE_FORMAT_UNIXTIME);
             
             $articleCat = $item->getCategory();
             
@@ -617,15 +605,9 @@
             foreach($list as $item)
             {
                 $dateObject = $item->getDateObject();
-                $time = $dateObject->getTimestamp();
-                $time = mktime(
-                    substr($time,8,2),
-                    substr($time,10,2),
-                    substr($time,12,2),
-                    substr($time,4,2),
-                    substr($time,6,2),
-                    substr($time,0,4)
-                );
+                include_once( PLOG_CLASS_PATH."class/data/Date.class.php" );
+                // Get the unix time stamp 
+                $time = $dateObject->getTimestamp(DATE_FORMAT_UNIXTIME);
 
                 $dummy                  = array();
                 $dummy["userid"]        = $item->_userInfo->_id;
@@ -670,15 +652,9 @@
             foreach($list as $item)
             {
                 $dateObject = $item->getDateObject();
-                $time = $dateObject->getTimestamp();
-                $time = mktime(
-                    substr($time,8,2),
-                    substr($time,10,2),
-                    substr($time,12,2),
-                    substr($time,4,2),
-                    substr($time,6,2),
-                    substr($time,0,4)
-                );
+                include_once( PLOG_CLASS_PATH."class/data/Date.class.php" );
+                // Get the unix time stamp 
+                $time = $dateObject->getTimestamp(DATE_FORMAT_UNIXTIME);
 
                 $articleCat = $item->getCategory();
 



More information about the pLog-svn mailing list