Page MenuHomePhabricator

Include server time in JS output
Closed, DeclinedPublic


example implementation

As not every computer on this planet is synked against the servers I suggest to include the server time in the output. Following patch is an example how to. Though javascript really wants the timestamp in milliseconds, but php's 32 bits wont handle that. But a near second I feel is enough.

Version: unspecified
Severity: enhancement




Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:51 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz10264.
bzimport added a subscriber: Unknown Object (MLST).

When handling user scripts, it can sometimes be necessary to know if a given comment was posted one minute ago, or 21 minutes ago. As not all computers are synked to the wikipedia servers, it might result in some strange results otherwise (like a comment that is in the future).

This is incompatible with caching requirements; cached pages would give the time of the previous page generation, which would just cause weird inconsistent behavior in anything expecting that to be "current" time.