# Timeline timestamp not updating

**URL:** <https://meta.discourse.org/t/timeline-timestamp-not-updating/256447>\
**Category:** Bug\
**Created:** [February 27, 2023, 11:03pm UTC](https://meta.discourse.org/t/timeline-timestamp-not-updating/256447 "2023-02-27T23:03:21Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![isaac](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/isaac/32/235758_2.png) [@isaac](https://meta.discourse.org/u/isaac)\
**Post date:** [March 8, 2023, 5:39pm UTC](https://meta.discourse.org/t/timeline-timestamp-not-updating/256447/4 "2023-03-08T17:39:20Z")

</div>

Digging in to the old implementation, I am wondering if this was a issue before as well…

```plaintext
      const bottomAge = relativeAge(
        new Date(topic.last_posted_at || topic.created_at),
        {
          addAgo: true,
          defaultFormat: timelineDate,
        }
      );
      const scroller = [
        h(
          "div.timeline-date-wrapper",
          this.attach("link", {
            className: "now-date",
            rawLabel: bottomAge,
            action: "jumpBottom",
          })
        ),
      ];

```

This was called in the `html()` function of the widget, which it doesn’t look like we have any hooks for updating this as the time passes.

Obviously the desired functionality is to update the `bottomAge` with the newest date on post creation, and then continue to update it automatically as the time passes. What we can do right now is add a function to

> <https://github.com/discourse/discourse/blob/d78fed7dc63565b2864381bf7877ba6673dc642c/app/assets/javascripts/discourse/app/components/topic-timeline/container.js#L169-L170>

and update `bottomAge` **on scroll** , but in practice feels a little odd. Another issue with this idea is that it is difficult to match the timing of the updating of the date on the latest post to the updating of the `bottomAge` date on the topic timeline. The relative `created_at` on a post lags behind by a 10 seconds or so… creating a miss match between

 ![Screenshot 2023-03-08 at 11.35.43 AM](https://global.discourse-cdn.com/meta/original/4X/6/1/a/61a4ce67cdf2f719f491951f86fd1ecf62f726ee.png)

when you are scrolling.

Ideally we would track the relative post `created_at` date and just plug it in to the timeline, but I don’t know if this is possible atm.

@david, do you have any ideas?

---

_[View the full topic](https://meta.discourse.org/t/timeline-timestamp-not-updating/256447)._
