Last modified: 2014-04-01 13:46:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T65352, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63352 - Make an API to return system time
Make an API to return system time
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 63339
  Show dependency treegraph
 
Reported: 2014-04-01 08:12 UTC by Peter Bena
Modified: 2014-04-01 13:46 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Peter Bena 2014-04-01 08:12:03 UTC
Sometimes tool needs to be in sync with system time of server where mediawiki run. There should be an api that would just return the timestamp of server in some easy-to-parse format so that tools can adjust local system time of machine where they run with time of server where wiki is.
Comment 1 Peter Bena 2014-04-01 08:19:22 UTC
maybe it would be better if one of returned values was just offset of central time, so that it's more precise, that way there would be no lag caused by the time that it took for server to deliver the result of api to client
Comment 2 Brad Jorsch 2014-04-01 13:46:05 UTC
I think you're conflating two issues here. System time doesn't depend on timezone, and timezone doesn't really say anything about the accuracy of system time. And if you're really wanting to synchronize the local system to correct time, you should probably be using something like NTP.[1]

But at any rate, this information has been a part of meta=siteinfo since 2008 (r37034). See the keys 'time', 'timezone', and 'timeoffset'.[2]

 [1]: https://en.wikipedia.org/wiki/Network_Time_Protocol
 [2]: https://en.wikipedia.org/w/api.php?action=query&meta=siteinfo

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links