A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgLocalTZoffset below:

Manual:$wgLocalTZoffset - MediaWiki

Add a distance to the server timezone in minutes.
Introduced in version: Before 1.1.0 Removed in version: Still in use Allowed values: (numeric) or null Default value: null

Set an offset from UTC in minutes to use for the default timezone setting for anonymous users and new user accounts. Also used for users who set the corresponding text field in their preferences to an empty string. This setting is used for most date/time displays in the software, and is overrideable in user preferences. It is NOT used for signature timestamps.

Leave at NULL to show times in universal time (UTC/GMT), or specify an offset in minutes.

Warning: Changing this parameter during runtime may result in server crash (Apache on Windows).

To avoid problems with daylight saving time, you can have PHP calculate the offset for you. date('Z') returns the timezone offset in seconds. The offset for timezones west of UTC is always negative, and for those east of UTC is always positive:

$wgLocaltimezone = 'CET';
// Set to timezone offset in minutes as calculated by PHP
$wgLocalTZoffset = date('Z') / 60;
$wgLocaltimezone = 'Australia/Sydney'
$wgLocalTZOffset = timezone_offset_get(
    timezone_open($wgLocaltimezone),
    date_create('now', timezone_open('UTC'))
) / 60; // Convert offset to minutes

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4