Last modified: 2014-05-16 13:21:55 UTC
TimeValues that have timestamps such as '+00000001995-00-00T00:00:00Z' with '00' for month and/or day gets converted to '1995-00-00T00:00:00Z' then is passed through MWTimestamp( $timestamp ), which in turn does new DateTime( $timestamp ) for TS_UNIX. new DateTime( '1995-00-00T00:00:00Z' ) results in an object with date value of '1994-11-30 00:00:00'. MwIsoTimestampFormatter then considers the year invalid since original '1995' != '1994' and on failure, does fallback to outputting a timestamp. Example of an item where this occurs on Wikidata is https://www.wikidata.org/wiki/Q4119465
this is when the TimeValue has PRECISION_YEAR
btw, the iso regex pattern for validation is '!^[-+]\d{1,16}-(0\d|1[012])-([012]\d|3[01])T00:00:00Z$!' so 00 for month and/or day is considered valid.
Change 130617 had a related patch set uploaded by Aude: Fix formatting of TimeValues with month or day = '00' in timestamp https://gerrit.wikimedia.org/r/130617
Change 130617 merged by jenkins-bot: Fix formatting of TimeValues with month or day = '00' in timestamp https://gerrit.wikimedia.org/r/130617
Change 130827 had a related patch set uploaded by Aude: Fix formatting of TimeValues with month or day = '00' in timestamp https://gerrit.wikimedia.org/r/130827
Change 130827 merged by jenkins-bot: Fix formatting of TimeValues with month or day = '00' in timestamp https://gerrit.wikimedia.org/r/130827