Last modified: 2014-05-01 11:06:18 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 T62999, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60999 - ISO date format has leading and trailing zeros
ISO date format has leading and trailing zeros
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-06 22:57 UTC by John Mark Vandenberg
Modified: 2014-05-01 11:06 UTC (History)
6 users (show)

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


Attachments

Description John Mark Vandenberg 2014-02-06 22:57:12 UTC
Steps to reproduce:
1. Set ISO dates in the user prefs on Wikidata
2. Go to https://www.wikidata.org/wiki/Q6396063

Expected results:
Dates are formatted like "1983-06-13", noting that is the precision of the data

Actual results:
Dates having leading zeros and include milliseconds, like "+00000001983-06-13T00:00:00Z"
Comment 1 Nemo 2014-04-30 15:07:45 UTC
Can't riproduce on that page, but Ladsgroup just linked a diff where the date is shown as +00000000795-00-00T00:00:00Z (even with standard preference).
Same issue?

https://www.wikidata.org/w/index.php?title=Q4119465&diff=123932128&oldid=123931985
http://lists.wikimedia.org/pipermail/wikidata-l/2014-April/003768.html
Comment 2 John Mark Vandenberg 2014-04-30 19:57:37 UTC
(In reply to Nemo from comment #1)
> Can't riproduce on that page

When I try to reproduce, I see "date of birth: 30 May 1941" - my ISO 8601 date preference is now being ignored.

> but Ladsgroup just linked a diff where the date is shown 
> as +00000000795-00-00T00:00:00Z (even with standard preference). 
> ..
> Same issue?

That is the same problematic output.  ISO dates for the Gregorian year range 1583-9999 are tightly regulated by the spec, and should have four digits _only_ for the year, with the '+' prefix being unnecessary and probably even non-conformant.  All other year values are not valid without a published specification from the sender.

Also, day precision with timezone precision is best formatted as '1941-05-30Z' (I vaguely also recall seeing '1941-05-30TZ' recommended, but I cant find that now).  Including lots of zeros for the time adds ambiguity to the receivers ability to understand the ISO date.

Based on listening to devs chatting, the Wikibase falls back to ISO formatting when it cant localise the format.
Comment 3 Daniel Kinzler 2014-05-01 11:06:18 UTC
Part of the issue is that diffs are cached. They must not depend on user settings. IIRC we set them up to be cached per language (would be bad to mix languages in the cache), but things like date format preferences really shouldn't go in there. Or we have to disable caching.

I guess we should have a separate bug for that. The caching issue is separate from the formatting issue (exposing the canonical "padded" for of the time string).

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


Navigation
Links