[META] Forum Timestamps
-
Going back to our off-topic tangent in another thread about the forum “n minutes ago” timestamps being out of sync with reality, such as
When I posted in a more recent thread, I happened to glance at my computer time, which said 7:23am… The “n minutes ago” said “3 minutes ago” for the OP (14:20:07.507Z), and “8 minutes ago” for mine (14:31:32.046Z). I realized: the server time is 8 minutes ahead of where my computer’s clock is. So when it did the math on the OP, 7:23-7:20:07.507, it got +3 minutes ago. When it tried the math on mine, 7:23-7:31:32.046Z, it got -8 minutes “ago”… which it incorrectly displayed as “8 minutes ago”. Thus, I believe it’s doing the math on the browser side using the time my browser sees for “now”, compared to the time the server reports for each individual post; it then displays the absolute value of that delta as the number of minutes “ago”… so when the server’s time is ahead of my computer’s time, it incorrectly displays something 8 minutes in the future as being 8 minutes in the past.
-
In searching through some of the NodeBB javascript, I found view-source:https://notepad-plus-plus.org/community/nodebb.min.js has “
var i=n.prefixAgo;var r=n.suffixAgo;if(this.settings.allowFuture){if(t<0){i=n.prefixFromNow;r=n.suffixFromNow}}
”. So there may be a forum setting which allows it to display “from now” instead of “ago” when the timestamp is in the future compared to browser local time. -
@Peter-Jones You might want to correct the typo in the title, if possible.
-
Eeek. Unfortunately, I don’t seem to have that ability. Maybe one of the moderators will have the subject-line-changing superpower, to change from “Timetamps” to “Timestamps”
-
-
Thanks, @guy038