# Migrate a vBulletin 4 forum to Discourse

**URL:** https://meta.discourse.org/t/migrate-a-vbulletin-4-forum-to-discourse/54881
**Category:** Sysadmins
**Tags:** how-to
**Created:** [28 december 2016 om 14:59 UTC](https://meta.discourse.org/t/migrate-a-vbulletin-4-forum-to-discourse/54881 "2016-12-28T14:59:29Z")
**Posts on this page:** 1
**Showing post:** 198

<div class="post-metadata">

### Author: ![tom1984](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tom1984/32/528342_2.png) [@tom1984](https://meta.discourse.org/u/tom1984)
#### Post date: [8 november 2025 om 13:28 UTC](https://meta.discourse.org/t/migrate-a-vbulletin-4-forum-to-discourse/54881/198 "2025-11-08T13:28:49Z")

</div>

It’s running 😎

I must admit, chatgpt helped me out. Needed to replace:

```plaintext
def parse_timestamp(timestamp)
  Time.zone.at(@tz.utc_to_local(timestamp))
end

```

which is right at the bottom of the importer script

with:

```plaintext
def parse_timestamp(timestamp)
  return nil if timestamp.nil? || timestamp.to_i == 0

  # Convert integer → Time → Apply timezone → Convert to Rails Time.zone
  utc_time = Time.at(timestamp.to_i).utc
  local_time = @tz.utc_to_local(utc_time)
  Time.zone.at(local_time)
end

```

…it’s chugging through the topics now, but I can see things appearing on the site. I will report back to (hopefully) say it’s a success afterwards. If it is, I might make another topic on here with a guide of what I did to get it all working.

---

_[View the full topic](https://meta.discourse.org/t/migrate-a-vbulletin-4-forum-to-discourse/54881)._
