Community
    • Login

    [META] Forum Timestamps

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 3 Posters 3.8k Views 1 Watching
    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.
    • PeterJonesP Offline
      PeterJones
      last edited by guy038

      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
      • PeterJonesP Offline
        PeterJones
        last edited by

        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
        • chcgC Offline
          chcg
          last edited by

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

          1 Reply Last reply Reply Quote 1
          • PeterJonesP Offline
            PeterJones
            last edited by PeterJones

            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
            • guy038G Online
              guy038
              last edited by

              Hi, @peterJones,

              Done !

              Cheers

              guy038

              1 Reply Last reply Reply Quote 1
              • PeterJonesP Offline
                PeterJones
                last edited by

                Thanks, @guy038

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors