When searching for a year/month with the year/month selector on
Special:Contributions or action=history the given time should be treated
as wiki time and therefore needs adjust to UTC before search in the
Database.
This has no effect on wikis with UTC like enwiki, but for example on
dewiki with an offset from 1hour/2hour.
Change-Id: Iccd41d19a360827b9c80b66582ca0daa7ed7576c
$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() );
}
}