[pLog-svn] r2422 - plog/branches/plog-1.0.2/class/locale

pwestbro at devel.plogworld.net pwestbro at devel.plogworld.net
Sat Aug 27 15:36:36 GMT 2005


Author: pwestbro
Date: 2005-08-27 15:36:35 +0000 (Sat, 27 Aug 2005)
New Revision: 2422

Modified:
   plog/branches/plog-1.0.2/class/locale/locale.class.php
Log:
Fixed the last part of bug http://bugs.plogworld.net/view.php?id=442

Now the time zone offset is retured for the post date, instead of always
returning the current time zone offset.


Modified: plog/branches/plog-1.0.2/class/locale/locale.class.php
===================================================================
--- plog/branches/plog-1.0.2/class/locale/locale.class.php	2005-08-25 16:58:03 UTC (rev 2421)
+++ plog/branches/plog-1.0.2/class/locale/locale.class.php	2005-08-27 15:36:35 UTC (rev 2422)
@@ -498,8 +498,21 @@
             $weekdayId = $timeStamp->getWeekdayId();
             $weekday = $this->_messages["days"][$weekdayId];
             
-            // Get the time zone offset for the server
-            $timeZoneSec = date("Z");
+            
+            // 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)
+            );
+
+            // Get the time zone offset for the server, on the specified date
+            $timeZoneSec = date("Z", $time);
             if ( $blog ) {
                 //
                 // The blog was specified.  Use it to get the time offset




More information about the pLog-svn mailing list