Page MenuHomePhabricator

SMW handles timezones incorrectly.
Closed, DeclinedPublic

Description

Author: van.de.bugger

Description:
SMW handles timezones incorrectly.

It does not recognize official timezone names, like America/New_York'. It recognizes only abbreviations, like EST'.

But the major problem is the list of monikers hardcoded into `SMW_DV_Time.php':

/// General purpose time zone monikers and their associated offsets in hours and fractions of hours
protected static $m_tz = array( 'A' => 1, 'ACDT' => 10.5, 'ACST' => 9.5, 'ADT' => -3, 'AEDT' => 11,
...

The problem is that an offset of a particular moniker is *not* fixed but depends on time. Sometimes government in a country may enable or disable daylight saving time, or change offset. And do it many times.

There is tzdata database, which contain all known info about timezones. SMW must use it to handle timestamps properly.

It seems easiest way to use tzdata is using PHP DateTime and DateTimeZone classes for handling times.


Version: unspecified
Severity: normal

Details

Reference
bz32758
ReferenceSource BranchDest BranchAuthorTitle
repos/cloud/toolforge/envvars-cli!6add_package_buildmaindcaroci: build debian and pypi packages
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:07 AM
bzimport set Reference to bz32758.
bzimport added a subscriber: Unknown Object (MLST).
Aklapper subscribed.

The Semantic MediaWiki developers requested in https://phabricator.wikimedia.org/T64114 to move their task tracking to https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues and to close remaining tasks in Wikimedia Phabricator. If you still face the problem reported in this task in a supported version of SMW, please feel free to transfer your report to https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues . We are sorry for the inconvenience.