Page MenuHomePhabricator

incorrect time displayed in History when in daylight saving site
Closed, InvalidPublic

Description

Author: paolobenve

Description:
I have a mediawiki installation, using italian locales.

In Italy we have summer daylight saving site.

During the winter, history shows the time of the contributions correctly, but during the summer history shows the time of the contributions without considering the +1 hour shift.


Version: 1.15.x
Severity: minor
OS: Linux
Platform: PC

Details

Reference
bz25751

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:21 PM
bzimport set Reference to bz25751.
bzimport added a subscriber: Unknown Object (MLST).

What is $wgLocaltimezone set to in LocalSettings.php ?

paolobenve wrote:

#Set Default Timezone
$wgLocaltimezone = "Europe/Rome";
$oldtz = getenv("TZ");

paolobenve wrote:

#Set Default Timezone
$wgLocaltimezone = "Europe/Rome";
$oldtz = getenv("TZ");
putenv("TZ=$wgLocaltimezone");

  1. Versions before 1.7.0 used $wgLocalTZoffset as hours.
  2. After 1.7.0 offset as minutes

$wgLocalTZoffset = date("Z") / 60;
putenv("TZ=$oldtz");

Do you control the PHP installation? If so, maybe setting the timezone in the php.ini will help.