private function getTimezoneLiteralWithModifiedDateTime(&$dateTime) { $timezone = 0; // If the date/time is in the UTC form then it is assumed that no other // TZ was selected to modify a value output hence it would be possible // to match a user preference with the `timecorrection` setting and use // it as an input for those dates to make the display take into account // a user ontext. // // - Inject/use a setter for the `timecorrection` preference as it depends // on a User object. // - The ParserCache doesn't recognizes changes for users with different // `timecorrection` settings therefore this needs to be dealt with before // otherwise a change by one user will remain active in the ParserCache // even though a different user has a different `timecorrection` setting. // Changes to the output is only triggered when the ParserCache is evicted or // purged manually. if ($this->dataItem->getTimezone() === '0') { // $parts = explode( '|', $GLOBALS['wgUser']->getOption( 'timecorrection' ) ); // $timezone = count( $parts ) == 3 ? $parts[2] : false; } else { $timezone = $this->dataItem->getTimezone(); } return Timezone::getTimezoneLiteralWithModifiedDateTime($dateTime, $timezone); }