https://bugzilla.wikimedia.org/show_bug.cgi?id=16847
Summary: {{#time}} gives incorrect result if server not set to
UTC.
Product: MediaWiki extensions
Version: any
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: Normal
Component: ParserFunctions
AssignedTo: [email protected]
ReportedBy: [email protected]
On a server set to a non-UTC time zone, the #time function gives odd results.
Server set to PST (UTC -8):
{{#time: j F Y H:i | 2008-12-24 12:01:29 }} is rendered as "24 December 2008
20:01"
{{#time: j F Y H:i | 2008-12-24 12:01:29+00 }} is rendered as "24 December 2008
12:01"
{{#time: j F Y H:i | 2008-12-24 12:01:29+01 }} is rendered as "24 December 2008
11:01"
The result is always rendered in UTC, regardless of what the input or server
time is set to. And if no time zone is set, the time zone php is set to is used
(I think this is the fault of PHP's strtotime function).
This gives a highly confusing situation where rendering a time gives a
different time. This could also cause some very subtle errors (eg: a wiki set
to London time would be wrong half the year only).
My workaround was to set
date_default_timezone_set("UTC");
in LocalSettings.php.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l