• Login
Community
  • Login

[META] Forum Timestamps

Scheduled Pinned Locked Moved General Discussion
6 Posts 3 Posters 3.3k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P
    PeterJones
    last edited by guy038 Oct 1, 2018, 9:08 AM Sep 28, 2018, 2:50 PM

    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.

    1 Reply Last reply Reply Quote 1
    • P
      PeterJones
      last edited by Sep 28, 2018, 3:21 PM

      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.

      1 Reply Last reply Reply Quote 1
      • C
        chcg
        last edited by Sep 30, 2018, 8:40 AM

        @Peter-Jones You might want to correct the typo in the title, if possible.

        1 Reply Last reply Reply Quote 1
        • P
          PeterJones
          last edited by PeterJones Oct 1, 2018, 2:05 AM Oct 1, 2018, 2:04 AM

          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”

          1 Reply Last reply Reply Quote 0
          • G
            guy038
            last edited by Oct 1, 2018, 9:10 AM

            Hi, @peterJones,

            Done !

            Cheers

            guy038

            1 Reply Last reply Reply Quote 1
            • P
              PeterJones
              last edited by Oct 1, 2018, 1:05 PM

              Thanks, @guy038

              1 Reply Last reply Reply Quote 0
              6 out of 6
              • First post
                6/6
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors