# Editing timestamps?

**URL:** <https://www.ruby-forum.com/t/editing-timestamps/144317>\
**Category:** Rails\
**Created:** [July 28, 2008, 4:49pm UTC](https://www.ruby-forum.com/t/editing-timestamps/144317 "2008-07-28T16:49:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![drsharp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e9bcb4/32.png) [@drsharp](https://www.ruby-forum.com/u/drsharp)\
**Post date:** [July 28, 2008, 4:49pm UTC](https://www.ruby-forum.com/t/editing-timestamps/144317/1 "2008-07-28T16:49:46Z")

</div>

Hi, I’m redeveloping an old site for someone and want to import all  
their old news archives into my database. They were previously stored  
as text in the html so I’m having to cut and paste each story, so  
everything is timestamped with today’s date. What’s the easiest way to  
edit the timestamp so I can change it to the date it was originally  
created?

Thanks

---

<div class="post-metadata">

**Author:** ![drsharp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e9bcb4/32.png) [@drsharp](https://www.ruby-forum.com/u/drsharp)\
**Post date:** [July 28, 2008, 11:25pm UTC](https://www.ruby-forum.com/t/editing-timestamps/144317/2 "2008-07-28T23:25:07Z")

</div>

> What’s the easiest way to  
> edit the timestamp so I can change it to the date it was originally  
> created?

There are a couple of ways you can do this. If you have access to the  
database, you can probably export and re-import the data wholesale  
(but you said the articles are in HTML). If you’re OK with cut-and-  
paste, you can always edit the timestamps manually in the new database  
and change them to the old values.
