Merge "Split classes in Import.php into separate files"
[lhc/web/wiklou.git] / includes / pager / ReverseChronologicalPager.php
index 4f8c438..ee6e26c 100644 (file)
@@ -113,6 +113,10 @@ abstract class ReverseChronologicalPager extends IndexPager {
                        $ymd = 20320101;
                }
 
-               $this->mOffset = $this->mDb->timestamp( "${ymd}000000" );
+               // Treat the given time in the wiki timezone and get a UTC timestamp for the database lookup
+               $timestamp = MWTimestamp::getInstance( "${ymd}000000" );
+               $timestamp->setTimeZone( $this->getConfig()->get( 'Localtimezone' ) );
+
+               $this->mOffset = $this->mDb->timestamp( $timestamp->getTimestamp() );
        }
 }