Jump to content

Manual talk:Timestamp

Add topic
From mediawiki.org
Latest comment: 12 years ago by Leucosticte in topic The format of timestamps is yyyymmddhhmmss??
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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)Reply

The format of timestamps is yyyymmddhhmmss??

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

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