Last modified: 2011-12-01 23:10:10 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T34758, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32758 - SMW handles timezones incorrectly.
SMW handles timezones incorrectly.
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-01 23:10 UTC by Van de Bugger
Modified: 2011-12-01 23:10 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Van de Bugger 2011-12-01 23:10:10 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links