Editing Skype history / messages / database

Sometimes you just got to edit your Skype messages history. One may want to make a joke or maybe even malicious disinformation. I had to edit Skype history because I was seeing messages from future. No I'm not insane. I had to set local PC time to the future date due to one of my development tasks. And all messages I received when I was "in future" was recorded as from future indeed in Skype. When I turned my local time back to real one, new messages in Skype was appearing above the "future" ones.

Skype forums tell there's no solution but to clear messages history. But that's not an option!
Actually, Skype history is stored in SQLite database, located in

c:\Users\<WindowsUserName>\Application Data\Skype\<SkypeUserName>\main.db

We will need some tool to edit SQLite database, first thing I found was SQLite Database Browser, and it worked well.

Sqlite Database Browser

Opened Skype database with SQLite Database Browser 2.0 b1

I just had to be sure I have closed my Skype, execute simple SQL query

select * from Messages
order by timestamp desc
limit 100

to look at the "future" timestamp, and then apply the fix:

update Messages
set timestamp = 1369400643
where timestamp > 1369400643

 then press Save Database.

Launched Skype and verified that everything is ok. Don't forget to backup your Skype dabatase before opening and editing it, in case something cruel happen!

Here is video instruction I have found on Youtube:

Actually it's possible to make better SQL query, one that would turn future posts date into real one, not just something constant in the past. If it would not be hard for you, please post it in comments.