[Mediawiki-l] non-utc time variables

cohesion cohesion at sleepyhead.org
Mon Aug 21 16:34:38 UTC 2006


On 8/21/06, Brion Vibber <brion at pobox.com> wrote:
> cohesion wrote:
> > It seems like it would be a common request, but I can't seem to find
> > the solution. How can I set the time offset so that time variables
> > like {{CURRENTDAYNAME}} are based on something other than UTC. I am
> > running mediawiki for a small group of geographically homogeneous
> > users and having things be based on UTC is very confusing for them.
>
> What I've recommended is adding a {{LOCALTIME}}, {{LOCALDAY}} etc set of
> parallel variables which will use the site-defined local time. This will avoid
> breaking compatibility.
>
> You could probably hack it in pretty easily in Parser.php; if you do please
> submit a patch. ;)


Thanks, {{LOCALTIME}} etc would be great, in the meantime I did a
super hacky thing just manually offsetting the $ts variable with what
I want, which works, but probably isn't nice. I am not great at php :)

It doesn't seem to do anything horrible or unexpected.



More information about the MediaWiki-l mailing list