Incorrect posts timestamp after scheduled publish (topic timer)

AI-generated summary

A user reported an issue where posts in a topic scheduled for publication via the topic timer feature displayed incorrect timestamps, showing as being created in the future with a ‘1m’ time indicator. Maciej_Wiercioch highlighted that posts created before the scheduled publish date were affected. tgxworld acknowledged the bug, explaining that while the system allows posts to be moved into the future to maintain order, the client side fails to display such posts correctly. tgxworld proposed a fix: resetting all post timestamps to match the topic’s publication date when publishing to a category, as the current method of applying time differences leads to invalid future timestamps. The issue was resolved with a code change committed.

Hello :slight_smile:

Yesterday we have posted our first topic that was published using topic timer feature (https://discuss.codecademy.com/t/challenge-word-transformation/84306/5). The topic was prepared in the category restricted to the TL >= 3, and published in the publicly accessible category.

There were some posts in this discussion and they were successfully transferred, but something went wrong. Time indicator next to the posts created before auto publishing always shows 1m. And the timestamp shows that post was created in the future:

I expected that all posts will have the same creation date as the topic itself.

Thanks!

Is this a bug @tgxworld?

إعجاب واحد (1)

It does seem like a pretty weird behaviour to me. Based on past discussions, I think we wanted to ensure things didn’t seem out of order so we allowed posts to be moved in the future. Unfortunately, our client side doesn’t display posts in the future very well.

https://meta.discourse.org/t/update-changing-timestamp-through-ui/29464/37?u=tgxworld

https://meta.discourse.org/t/update-changing-timestamp-through-ui/29464/25?u=tgxworld

إعجابَين (2)

@codinghorror I think for publish to category, we should just reset all the timestamps of posts in the topic instead of calculating/applying the time differences to the subsequent posts since publish to category is always going to result in timestamps being in the future.

4 إعجابات

Whatever is easiest and works is fine by me!

إعجابَين (2)

Fixed in

https://github.com/discourse/discourse/commit/238a15630023897b4cbc851ac912f098becb31fa

6 إعجابات

This topic was automatically closed after 25 hours. New replies are no longer allowed.