Confirmed XF.DynamicDate may show wrong output

Kirby

Well-known member
Licensed customer
Affected version
2.3.13
XF.DynamicDate calculates the time drift between client and server once upon page load.

If the page (for example a thread) ist kept open for a long time, the drift changes in between (for example client drift becomes more than -2 seconds) and a new reply is made by the client this may cause output like "In a moment", "In a minute", etc. while in fact the content was obviously posted just now.

Suggested Fix
When doing a refresh and now significantly differs from localLoadTime + numRefreshes * refreshInterval resync with server time.
 
Automated triage: Confirmed

Thank you for reporting this issue. We've confirmed this, and we're using this thread to track several reports of the same problem, including your report about XF.getLocalLoadTime, which we've merged into this one. Relative times are worked out in the browser from an estimate of the server's current time, taken when the page loads and never checked again. If that estimate goes wrong, whether through clock drift on a page left open, a page restored from the browser's cache, or timing data that's off after a device sleeps, new content can show as being in the future, such as "In a moment", "In 5 minutes" or "Later today at…", until the page is refreshed. We'll look at fixing this.

This is an automated assessment. A member of staff may review and update it.
 
Back
Top Bottom