Manual talk:Timestamp

Jump to navigation Jump to search

Is there a way to get the API to provide timestamps in yyyymmddhhmmss format? It's giving them to me in yyyy-mm-ddThh:mm:ssZ format. See for example:

Well, anyway, I got around it with:

$undesirables = array ( '-', ':', 'T', 'Z' );
$timestamp = str_replace ( $undesirables, '', $timestamp );

Leucosticte (talk) 08:02, 24 September 2012 (UTC)

The format of timestamps is yyyymmddhhmmss??[edit]

From this API call what I get is "2013-11-02T12:07:40Z".--Gqqnb (talk) 13:08, 23 December 2013 (UTC)

That's different. There, it's been converted into TS_ISO_8601 format by ApiQueryRevisions.php. Leucosticte (talk) 13:19, 23 December 2013 (UTC)