Last modified: 2006-08-23 16:53:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 366 - Time-Variables like CURRENTTIME and CURRENTDAY should use time zones
Time-Variables like CURRENTTIME and CURRENTDAY should use time zones
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
unspecified
All All
: Normal enhancement with 6 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 4068 5727 (view as bug list)
Depends on:
Blocks: 4499
  Show dependency treegraph
 
Reported: 2004-09-03 12:50 UTC by Daniel Kinzler
Modified: 2006-08-23 16:53 UTC (History)
3 users (show)

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


Attachments

Description Daniel Kinzler 2004-09-03 12:50:47 UTC
The special variables CURRENTTIME, CURRENTDAY, etc seem to report the time as
UTC (resp. GMT). This leads to a lot of confusion, for example (in the german
WP) the votes for deletion end up on "yestardays" page until 2am (because CEST
is UTC +02:00). I wonder how this is done in the en:WP - is there a workaround?

It would be extremely useful if one could specify a time zone or offset in a
setup-file, so that those variables return the local time. Alternatively, it
would be good (but probably more complexe) to have the variables behave as
funtions, i.e. {{CURRENTTIME(CEST)}} would return the time as CEST. Dealing with
daylight saving time is anotehr issue - maybe Olson-DB names should be used
instead of time zones. But there is no support for that in PHP. (or is there?)
Comment 1 Peter Gervai (grin) 2004-11-16 13:48:40 UTC
I second that we desperately need localised datetime variables. I believe they should bear a different name (maybe 
LOCALTIME, LOCALDAY, etc.) since UTC ones may be useful to have an universaly agreeing timestamp if anyone needs one. 

But this would be very good to get fixed either way. For me it doesn't seem to be complex to achieve, I'd guess at 
most 3-5 lines of code would do it.
Comment 2 Darkoneko 2005-05-14 11:39:56 UTC
I'm against that , because many wiki have contributors from several timezones...

examples :
en: has users from ''Great Britain (GMT+0)'' as well as in ''USA (GMT-5 to
-9)'', Australia, New Zealand, Ireland...
fr: has users from ''Belgium, France (GTM+1) -adding the "Département
d'outre-mer" that have various GMT- , ''Switzerland (GMT+2)'', ''Quebec (GMT-5)''...
es: has users from ''Spain (GMT+1)'' as well as in most central and south
america, Philippines, Equatorial Guinea...
Comment 3 Peter Gervai (grin) 2005-05-14 14:56:17 UTC
re #2: have you actually read #1? :-)

still, majority of national wikis would use LOCALtime in MOST places I believe.
en may be exception.
but there is the user settable "user local time" you remember, what about
USERLOCALTIME? As I told, it would be useful to have CURRENTTIME (utc) and
LOCALTIME  (userlocal) together. Having only utc is bad (apart from enwiki). IMO..

I wonder whether I should provide a patch for this very complex problem. :-P
[even if I don't know php I could probably come up with one, as it is very
possibly an oneliner]
Please?
Comment 4 jediarchives11 2005-07-27 02:08:36 UTC
I also think that the last edit time should be displayed somewhere on the article page.  I 
think that it would be helpful.
Comment 5 Niklas Laxström 2005-10-18 22:38:41 UTC
Pleasing the majority is ignoring the minority. For Wikimedia projects UTC
should be used, as they are split by languages, not by countries. Other projects
can use other time zones, and magic words should work accordingly already.
Comment 6 jediarchives11 2005-10-19 01:46:43 UTC
So you are saying that we should ignore the majority and please the minority?  
Both your local time and UTC should be used.  For example, the comment above was 
written at 22:38 UTC.  What time was that for me?  Was that written two hours ago, 
7 hours ago?  I have no idea.  So it would be nice if times like those could be 
put in local time, while vote closing times, for example, would be placed in UTC 
and local time.

Also, I don't think that this issue is resolved yet.
Comment 7 Brion Vibber 2005-11-25 19:48:14 UTC
*** Bug 4068 has been marked as a duplicate of this bug. ***
Comment 8 Andreas Praefcke 2006-01-04 17:27:48 UTC
de.wikipedia, for example, is somehow set up to show everything in CE(S)T. The
only thing in the whole software that does not behave like that is the
CURRENTDAY etc. variables. This seems to me not a policy thing that has anything
to do with minorities and majorities, but a simple bug. Please fix, or at least
introduce some new variables for the time zones (or a possibility to add/deduct
a specified number of hours to the variable). 
Comment 9 Daniel Kinzler 2006-01-08 22:16:32 UTC
MediaWiki uses $wgLocaltimezone (for signatures) and $wgLocalTZoffset (default
for all other dates) to calculate the offset for date/time display. The values
of CURRENTTIME and CURRENTDAY should be consistent with the times zones defined
by those settings. Also, it may be a good idea to merge them, having two
settings for the same thing, but requiering a different syntax, seems silly.
Comment 10 Effeietsanders 2006-02-02 21:49:57 UTC
*** Bug 4499 has been marked as a duplicate of this bug ***
Comment 11 Ed Poor 2006-03-24 16:52:09 UTC
Could we please get {{CURRENTHOUR}} and {{CURRENTMINUTE}} like the French
Wikipedia has? This would make time zone calculations easier in templates. 
Comment 12 ABCD 2006-03-24 17:10:12 UTC
(In reply to comment #11)
> Could we please get {{CURRENTHOUR}} and {{CURRENTMINUTE}} like the French
> Wikipedia has? This would make time zone calculations easier in templates. 

It appears that those two templates are just workarounds - take a look at
http://fr.wikipedia.org/wiki/Template:CURRENTHOUR?action=edit and
http://fr.wikipedia.org/wiki/Template:CURRENTMINUTE?action=edit
Comment 13 Darkoneko 2006-05-30 14:16:10 UTC
Well, that was sure quite not brilliant of the creator to volontary use a
system-varaible-like name... (but it may be intended for an easier replacement
by a real system variable) 
Comment 14 Mormegil 2006-07-01 15:40:26 UTC
*** Bug 5727 has been marked as a duplicate of this bug. ***
Comment 15 Rotem Liss 2006-08-23 16:53:46 UTC
Added local magic words in r16200.

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


Navigation
Links