# Incorrect sorting by date on Ask Discourse

**URL:** https://meta.discourse.org/t/incorrect-sorting-by-date-on-ask-discourse/381211
**Category:** Bug
**Tags:** ask-discourse
**Created:** [September 1, 2025, 11:41pm UTC](https://meta.discourse.org/t/incorrect-sorting-by-date-on-ask-discourse/381211 "2025-09-01T23:41:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [September 1, 2025, 11:41pm UTC](https://meta.discourse.org/t/incorrect-sorting-by-date-on-ask-discourse/381211/1 "2025-09-01T23:41:52Z")

</div>

On [ask.discourse.org](http://ask.discourse.org), the messages are listed in the sidebar, sorted by date.

However, I realised that it was incorrect. The one marked ‘Today’ was actually a message I sent yesterday.

In the sidebar:

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/8/9/18977da8930760fae29c87bbd707f102884d100d.png)

However, in the message, the timestamp shows `1d`:

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/4/f/24f02bff094a8275daad84d895e664abad4b493f.png)

I’ve checked my timezone setting in my Profile (through editing the URL) and it’s correct.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [September 2, 2025, 2:13am UTC](https://meta.discourse.org/t/incorrect-sorting-by-date-on-ask-discourse/381211/2 "2025-09-02T02:13:00Z")

</div>

This is unlikely to be a ask discourse thing just a general discourse ai thing.

We lean on t.last\_posted\_at for the grouping:

> <https://github.com/discourse/discourse/blob/a27d558f7abc66ea43e7819de76431d1b1f2f2a3/plugins/discourse-ai/assets/javascripts/discourse/services/ai-conversations-sidebar-manager.js#L250-L258>

Not on the creation date.
