ISO date format not honored by Mediawiki API (arvbadtimestamp_arvstart)
Open, LowestPublic


On MediaWiki 1.27, I can query for revisions made past a certain timestamp.

If, however, I format the timestamp this way:

  • 2016-08-30T00:00:00+00:00

I get an error. This timestamp, however, works.

  • 2016-08-30T00:00:00

This timestamp is ISO format generated from the following python line:

A small testcase to illustrate the problem even better:

Working URL:

Non working URL:

Ruphy created this task.Sep 1 2016, 10:45 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 1 2016, 10:45 AM

Datatypes are list on

There is no way to pass a timestamp with timezone to the api (or other inputs in mediawiki), "any included timezone is ignored"

I am not sure, if the api should accept this timestamp and just ignore the timezone or it is better to ignore the whole timestamp

Ruphy added a comment.Sep 1 2016, 1:38 PM

Timezone is part of the standard cited in that documentation, and it is what you get from standard python... so I think it makes sense to accept it somehow! How to do so it of course up to you :-)

Anomie added a subscriber: Anomie.Sep 1 2016, 1:44 PM

Note further that the handling of different timestamp formats is controlled by the MWTimestamp class used by MediaWiki for all timestamp manipulation. Any fix for this issue would likely be there rather than in the API itself.

Anomie added a comment.Sep 1 2016, 2:44 PM

Timezone is part of the standard cited in that documentation

It says "ISO 8601 date and time, 2001-01-15T14:56:00Z (punctuation and Z are optional)" and "ISO 8601 date and time with (ignored) fractional seconds, 2001-01-15T14:56:00.00001Z (dashes, colons, and Z are optional)". It doesn't specify that anything else in the ISO 8601 standard is allowed. 2001-01-15T14:56:00+00:00 and 2001-W03-2T14:56:00Z and 2001-015T14:56:00Z and 2001-01-15T14:56Z are all not recognized.

Aklapper triaged this task as Lowest priority.Sep 1 2016, 4:59 PM