# Editando a data do post?

**URL:** <https://meta.discourse.org/t/editing-post-date/19506>\
**Category:** Feature\
**Created:** [1 Setembro , 2014 15:36 UTC](https://meta.discourse.org/t/editing-post-date/19506 "2014-09-01T15:36:59Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)\
**Post date:** [2 Setembro , 2014 00:53 UTC](https://meta.discourse.org/t/editing-post-date/19506/18 "2014-09-02T00:53:47Z")

</div>

You can see how Discourse does this internally in the `PostCreator` class:

> <https://github.com/discourse/discourse/blob/v1.0.0/lib/post_creator.rb#L195-L203>

So in your case, this should do:

```ruby
t = Topic.find(123)
t.last_posted_at = t.posts.last.created_at
t.bumped_at = t.posts.last.created_at
t.save!

```

---

_[View the full topic](https://meta.discourse.org/t/editing-post-date/19506)._
