21 use Wikimedia\Timestamp\TimestampException;
43 $this->rangeConds = [];
46 if ( $startStamp !==
'' ) {
48 $startTimestamp->setTimezone( $this->
getConfig()->
get(
'Localtimezone' ) );
49 $startOffset = $this->mDb->timestamp( $startTimestamp->getTimestamp() );
50 $this->rangeConds[] = $this->mIndexField .
'>=' . $this->mDb->addQuotes( $startOffset );
53 if ( $endStamp !==
'' ) {
55 $endTimestamp->setTimezone( $this->
getConfig()->
get(
'Localtimezone' ) );
56 $endOffset = $this->mDb->timestamp( $endTimestamp->getTimestamp() );
57 $this->rangeConds[] = $this->mIndexField .
'<=' . $this->mDb->addQuotes( $endOffset );
60 $this->mYear = (int)$endTimestamp->format(
'Y' );
61 $this->mMonth = (int)$endTimestamp->format(
'm' );
62 $this->mDay = (int)$endTimestamp->format(
'd' );
63 $this->mOffset = $endOffset;
65 }
catch ( TimestampException $ex ) {
88 $legacyTimestamp->timestamp = $legacyTimestamp->timestamp->modify(
'-1 second' );
108 if ( $this->rangeConds ) {
109 $conds = array_merge( $conds, $this->rangeConds );