Last modified: 2013-11-01 23:21:07 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 13357 - #time displays wrong day when given date as input
#time displays wrong day when given date as input
Status: RESOLVED DUPLICATE of bug 7133
Product: MediaWiki extensions
Classification: Unclassified
ParserFunctions (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-14 13:20 UTC by Jerome
Modified: 2013-11-01 23:21 UTC (History)
2 users (show)

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


Attachments

Description Jerome 2008-03-14 13:20:11 UTC
{{ #time: j F}} gives correct results

however :

* {{ #time: j F | 20080317 }}
* {{ #time: j F | 2008-3-17 }}
* {{ #time: j F | 17 mars 2008 }}
* {{ #time: j F | 2008 17 mars}}

give

    * 16 mars
    * 16 mars
    * 18 mars
    * 18 mars 

expected :

    * 17 mars
    * 17 mars
    * 17 mars
    * 17 mars

--------------------------------------------

Version

    * MediaWiki: 1.11.0
    * PHP: 5.2.5 (cgi)
    * MySQL: 5.0.44-log 

Extensions

ParserFunctions (version 1.1.1)
Comment 1 Jerome 2008-03-14 13:32:12 UTC
Further investigation :

* {{ #time: j F H:i | 20080317 }}
* {{ #time: j F H:i | 2008-3-17 }}
* {{ #time: j F H:i | 17 mars 2008 }}
* {{ #time: j F H:i | 2008 17 mars}}

    * 16 mars 23:00
    * 16 mars 23:00
    * 18 mars 02:08
    * 18 mars 02:08 

--------------------------------------------

* {{ #time: j F H:i | 20080317 13:00 }}
* {{ #time: j F H:i | 2008-3-17 13:00 }}
* {{ #time: j F H:i | 17 mars 2008 13:00 }}
* {{ #time: j F H:i | 2008 17 mars 13:00 }}

    * 17 mars 12:00
    * 17 mars 12:00
    * Erreur : durée invalide
    * Erreur : durée invalide 

--------------------------------------------

* {{ #time: j F H:i | 20080317 0:00 }}
* {{ #time: j F H:i | 2008-3-17 0:00 }}
* {{ #time: j F H:i | 17 mars 2008 0:00 }}
* {{ #time: j F H:i | 2008 17 mars 0:00 }}

    * 16 mars 23:00
    * 16 mars 23:00
    * Erreur : durée invalide
    * Erreur : durée invalide 

--------------------------------------------

Note : There is probably a paramteter I did not set correctly about the server time because every time recorded (modification time/date for instance) is diplayed with a one hour difference with my local (french) time. I figured out default was GMT and I didn't take the time to investigate since I don't really care about modification times anyway. I mention it here since I see a 1 hour delay here to. Maybe solving that issue would make the two first formats work : 20080317 and 2008-3-17. Still it would not provide any explanation for the two others.

Comment 2 Jerome 2008-03-19 13:25:05 UTC
Comment on my last comment : Forget the part about the 1 hour delay. I just realized there is a user set parameter that I can set to french time. Now, modification dates are correct. And the #time function issue persists.
Comment 3 Jerome 2008-03-19 14:06:00 UTC
Regarding those lines in my previous comments
* {{ #time: j F H:i | 17 mars 2008 }}
* {{ #time: j F H:i | 2008 17 mars}}
I am realizing I misunderstood the use of this syntax. Apparently the 2008 is not understood as a year but as a time added to 06:00 in hhmm. This explains the 18 mars instead of 17 mars : 2008 added 20 hours to 06:00. 
(This behaviour could be dangerous, though, since entering 2008, one would expect it to be interpreted as a year.)

* {{ #time: j F H:i | 17 mars }}
gives an arbitrary
# 17 mars 06:00 
which seems to be correct since the result on http://fr.wikipedia.org is the same.


I still have an issue with the other syntax :

* {{ #time: Y j F H:i | 20080317 }}
* {{ #time: Y j F H:i | 2008-3-17 }}

# 2008 16 mars 23:00
# 2008 16 mars 23:00 

Comment 4 Karsten Hiddemann 2008-11-17 19:20:55 UTC
I have the exact same problem, all my dates are off by one if supplied as parameter to the #time parser function. Without parameter it works correctly.

* {{ #time: j F }}
* {{ #time: j F | 2008-3-17 }}

# 17 November
# 16 November

Time zone: localtime is set to Europe/Berlin
Comment 5 Ryan Kaldari 2013-11-01 23:18:22 UTC
This works fine for me. I think the problem you're running into is actually bug 7133. Since #time doesn't support timezones, it assumes that all times are in UTC. So if your server is set to a different timezone, the difference will be reflected in the output. Since the WMF servers are set to UTC, they give the following results (which are correct):

{{ #time: Y j F H:i | 20080317 }} -> 2008 17 mars 00:00
{{ #time: Y j F H:i | 2008-3-17 }} -> 2008 17 mars 00:00

*** This bug has been marked as a duplicate of bug 7133 ***
Comment 6 Ryan Kaldari 2013-11-01 23:21:07 UTC
It's also possible this was a duplicate of bug 17080, but I'm reasonably sure it falls under one or the other.

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


Navigation
Links