Fix numerous class/function casing
[lhc/web/wiklou.git] / includes / pager / ReverseChronologicalPager.php
index 4f8c438..31c9c6d 100644 (file)
@@ -39,12 +39,12 @@ abstract class ReverseChronologicalPager extends IndexPager {
                        return $this->mNavigationBar;
                }
 
-               $linkTexts = array(
+               $linkTexts = [
                        'prev' => $this->msg( 'pager-newer-n' )->numParams( $this->mLimit )->escaped(),
                        'next' => $this->msg( 'pager-older-n' )->numParams( $this->mLimit )->escaped(),
                        'first' => $this->msg( 'histlast' )->escaped(),
                        'last' => $this->msg( 'histfirst' )->escaped()
-               );
+               ];
 
                $pagingLinks = $this->getPagingLinks( $linkTexts );
                $limitLinks = $this->getLimitLinks();
@@ -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() );
        }
 }