[Mediawiki-api-announce] BREAKING CHANGE: prop=categories&clprop=timestamp now returns timestamps in ISO 8601 format

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Mediawiki-api-announce] BREAKING CHANGE: prop=categories&clprop=timestamp now returns timestamps in ISO 8601 format

Roan Kattouw
For consistency, prop=categories&clprop=timestamp now returns timestamps
in ISO 8601 format (e.g. 2008-08-23T18:05:46Z) rather than MediaWiki's
internal timestamp format (e.g. 20080823180546) as of r40161 [1]. All
timestamps that the API outputs are now in ISO 8601 format.

Roan Kattouw (Catrope)

[1] http://svn.wikimedia.org/viewvc/mediawiki?view=rev&revision=40161

_______________________________________________
Mediawiki-api-announce mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: [Mediawiki-api-announce] BREAKING CHANGE: prop=categories&clprop=timestamp now returns timestamps in ISO 8601 format

Jools Wills
> For consistency, prop=categories&clprop=timestamp now returns timestamps
> in ISO 8601 format (e.g. 2008-08-23T18:05:46Z) rather than MediaWiki's
> internal timestamp format (e.g. 20080823180546) as of r40161 [1]. All
> timestamps that the API outputs are now in ISO 8601 format.

And does it expect input timestamp in this format too ?

for example to make an edit you get the timestamp of the last revision,
and set basetimestamp to that. Will this still work ?

Best Regards

Jools


_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: [Mediawiki-api-announce] BREAKING CHANGE: prop=categories&clprop=timestamp now returns timestamps in ISO 8601 format

Roan Kattouw
Jools Smyth schreef:
>> For consistency, prop=categories&clprop=timestamp now returns timestamps
>> in ISO 8601 format (e.g. 2008-08-23T18:05:46Z) rather than MediaWiki's
>> internal timestamp format (e.g. 20080823180546) as of r40161 [1]. All
>> timestamps that the API outputs are now in ISO 8601 format.
>>    
>
> And does it expect input timestamp in this format too ?
>  
The API is pretty flexible in terms of input timestamps. The following
timestamp formats are supported:
* ISO 8601 (2008-08-23T18:05:46Z)
* MW's internal format (20080823180546)
* MySQL's internal format (2008-08-23 18:05:46)
* UNIX timestamps (number of seconds since January 1, 1970)

This should probably be documented somewhere.
> for example to make an edit you get the timestamp of the last revision,
> and set basetimestamp to that. Will this still work ?
If the API didn't accept timestamps copypasted from API output, that
would suck very much :) . Because I strive to make the API not suck (or
at least as little as possible), I'll guarantee that the API will at the
very least accept data in the format it outputs that same data in, for
all eternity.

Roan Kattouw (Catrope)


_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: [Mediawiki-api-announce] BREAKING CHANGE: prop=categories&clprop=timestamp now returns timestamps in ISO 8601 format

Jools Wills
> * ISO 8601 (2008-08-23T18:05:46Z)
> * MW's internal format (20080823180546)
> * MySQL's internal format (2008-08-23 18:05:46)
> * UNIX timestamps (number of seconds since January 1, 1970)

ah good to know. thanks

> If the API didn't accept timestamps copypasted from API output, that
> would suck very much :) . Because I strive to make the API not suck (or
> at least as little as possible), I'll guarantee that the API will at the
> very least accept data in the format it outputs that same data in, for
> all eternity.

hehe! :) well I had assumed it would be I do appreciate the clarification!
;-)

Best Regards

Jools


_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api