From 17b3fd4b63674752a654939746fddb815879614e Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Tue, 27 May 2008 10:18:28 +0000 Subject: [PATCH] API: Make action=block return an ISO 8601 timestamp rather than a UNIX timestamp --- RELEASE-NOTES | 1 + includes/api/ApiBlock.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index ce14ef1fcb..d21c7f67e5 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -368,6 +368,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Handled requesting disallowed tokens more gracefully * (bug 14140) URL-encoded page titles are now decoded in edit summaries * (bug 14243) Only accept post requests in action=edit; patch by HardDisk +* action=block now returns an ISO8601 timestamp, like all other modules do === Languages updated in 1.13 === diff --git a/includes/api/ApiBlock.php b/includes/api/ApiBlock.php index f11b4b2435..2a13c29bc8 100644 --- a/includes/api/ApiBlock.php +++ b/includes/api/ApiBlock.php @@ -95,7 +95,7 @@ class ApiBlock extends ApiBase { $res['user'] = $params['user']; $res['userID'] = $userID; - $res['expiry'] = ($expiry == Block::infinity() ? 'infinite' : $expiry); + $res['expiry'] = ($expiry == Block::infinity() ? 'infinite' : wfTimestamp(TS_ISO_8601, $expiry)); $res['reason'] = $params['reason']; if($params['anononly']) $res['anononly'] = ''; -- 2.20.1