Page MenuHomePhabricator

API: include time in siteinfo
Closed, ResolvedPublic

Description

Author: matthew.britton

Description:
patch against r61408

Knowing the server time is useful for a number of reasons; the particular reason in my case is to approximate the time difference between client and server and so get a rough estimate of the timestamp on incoming IRC RC feed items, as the feed itself doesn't provide this.

Currently, it is possible to get the server time through the API by using action=parse&text={{CURRENTTIMESTAMP}}. However, this is a bit awkward, and involves an extra request as 'parse' and 'query' actions can't be combined.

The attached patch adds a 'time' attribute to the output of meta=siteinfo, in the format used for timestamps elsewhere in the API.


Version: unspecified
Severity: enhancement

attachment time.patch ignored as obsolete

Details

Reference
bz22240

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:54 PM
bzimport added a project: MediaWiki-API.
bzimport set Reference to bz22240.

matthew.britton wrote:

patch against r61408

apparently this new version of bugzilla doesn't recognize patches as such in the same way as the old. should work this time.

Attached:

r61412

Thanks Gurch, why don't you apply for commit access? You've got a fairly decent history of patches (bar that one that file sorts, and besides, no one is perfect ;))