After playing a little bit with Drupal on a test site, I decided to use Drupal in two of my existing websites over Joomla. Due to the fact that these two are live sites already, ( one is 6 months old and the other is 2 years old), it would be weird to see that I have joined my sites just a few days ago.

I will be posting old articles with their original publishing dates on them as well so how did i post the articles a year ago if I just joined the site last week, get it! ;-).

Is there a way for me to change the creation date/ joining date of the admin account and my personal account then?

I tried checking the database but the 'created' field on the users table isn't a clean date and time but some sort of a code/hash. Any help in this? (If relevant, one account should have a joining date any day between May to August 2004) and account#2 should have a joining date between Jan-April 2006).

Help!

Comments

Tresler’s picture

I looked in user.module and found this:
$array['created'] = time();

which gave me the lead to go to http://php.net and find this:
http://us3.php.net/manual/en/function.time.php

So I checked my blog where I am the only user and saw that my created field was '1131993142'

following the logic that should "Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)." at the time that I made the account (40 weeks 1 day ago according to drupal.)

1131993142 / 60 / 60 / 24 / 365 = 35.89 years + my 40 weeks since creation of the acount works.

So....

I'd say figure out the date you want to be created (hehe) and then figure out how many seconds after January 1st 1970 that is and then enter that number into you users.created coloumn.

Good luck.

Tresler Designs

JohnNoc-old’s picture

thanks Tresler!

i'll look into this.

whew, math is not my cup of tea....thank google for http://www.google.no/search?q=convert+to+unix+timestamp cuz it returned numerous conversion tools :-)