[pLog-svn] r6918 - plog/branches/lifetype-1.2/class/data

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Wed Sep 9 19:07:19 EDT 2009


Author: jondaley
Date: 2009-09-09 19:07:18 -0400 (Wed, 09 Sep 2009)
New Revision: 6918

Modified:
   plog/branches/lifetype-1.2/class/data/plogcalendar.class.php
   plog/branches/lifetype-1.2/class/data/timestamp.class.php
Log:
Did we use TIME_DIFFERENCE_CALCULATION_DYNAMIC/STATIC at some point?  The new post page shows the current server time, rather than the user's local time (via the blog time offset variable).   People didn't notice too much due to the previous bug.  I'm removing these variables, and associated workaround code.  If someone wanted to use these variables, we could put the workaround code in every place where getBlogDate() is called.

Modified: plog/branches/lifetype-1.2/class/data/plogcalendar.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/data/plogcalendar.class.php	2009-09-09 21:51:45 UTC (rev 6917)
+++ plog/branches/lifetype-1.2/class/data/plogcalendar.class.php	2009-09-09 23:07:18 UTC (rev 6918)
@@ -116,18 +116,7 @@
          */
         function getMonthView($month, $year)
         {
-        
             $t = Timestamp::getBlogDate( $this->_blogInfo );
-            
-            // getBlogDate sometimes returns the time without the time zone applied.  If it wasn't
-            // We need to make sure that it is applied now
-            $config =& Config::getConfig();
-            if( $config->getValue( "time_difference_calculation" ) == TIME_DIFFERENCE_CALCULATION_DYNAMIC ) {
-                $blogSettings = $this->_blogInfo->getSettings();
-                $timeDifference = $blogSettings->getValue( "time_offset" );
-                $t->setDate( Timestamp::getDateWithOffset( $t->getDate(), $timeDifference ), DATE_FORMAT_TIMESTAMP );
-            }
-            
             return $this->getMonthHTML($month, $year, 1/*showYear*/, 
                                        $t->getTimestamp(DATE_FORMAT_UNIXTIME) );
         }

Modified: plog/branches/lifetype-1.2/class/data/timestamp.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/data/timestamp.class.php	2009-09-09 21:51:45 UTC (rev 6917)
+++ plog/branches/lifetype-1.2/class/data/timestamp.class.php	2009-09-09 23:07:18 UTC (rev 6918)
@@ -5,15 +5,6 @@
 	 lt_include( PLOG_CLASS_PATH."class/locale/locales.class.php" );
      lt_include( PLOG_CLASS_PATH."class/data/Date.class.php" );
 
-	 /**
-	  * constants used to determine whether we are using dynamic time
-	  * difference calculation or static time difference calculation (that is,
-	  * dates are stored 
-	  */
- 	 define( "TIME_DIFFERENCE_CALCULATION_DYNAMIC", 0 );	 
-	 define( "TIME_DIFFERENCE_CALCULATION_STATIC", 1 );
-
-
     /**
      * \ingroup Data
      *
@@ -301,13 +292,6 @@
          */
         function getBlogDate( $blog, $timestamp = null )
         {
-	       // check whether time differences are dynamically or statically
-	       // applied, because in case of the former, we don't have to do
-	       // anything here!
-	       $config =& Config::getConfig();
-	       if( $config->getValue( "time_difference_calculation" ) == TIME_DIFFERENCE_CALCULATION_DYNAMIC )
-	       		return( new Timestamp( $timestamp ));
-
 	       //
 	       // how's this for function overloading??
 	       // I know it's quite hackish, but it's a bit of a pain that



More information about the pLog-svn mailing list