View Full Version : [Request] Member local time shown
coffee
04-13-2001, 07:17 PM
Example:
DaKid
Senior Member
http://www.vbulletin.com/forum/images/icons/icon9.gif
Registered: Jan 2000
Location: Earth
Local Time: 10:10 pm
Posts: 999
tubedogg
04-13-2001, 08:22 PM
don't use [request] in the title
I like your idea. Wouldn't be too hard to do, either.
DeMoN
04-13-2001, 10:54 PM
ohh never thought of that.. that'd be gr8
Mike Sullivan
04-14-2001, 02:10 AM
To get it to display like that would take a hack, but you should be able to stick "Timezone: $userinfo[timezoneoffset] GMT" in postbit.
It would display something like "Timezone: -5 GMT".
tubedogg
04-14-2001, 03:13 PM
In showthread.php, find
$post[pmlink] = "";
}
and add right after it
$gmtime = gmdate("U",time());
$localtime = $gmtime-($userinfo[timezoneoffset]*3600);
$localtime = date($timeformat,$localtime);
Then in postbit, do something like
User's local time: $localtime
Untested but it should work.
Edit: I changed a bit that I realized wouldn't work. :o
coffee
04-15-2001, 06:58 PM
Both went through and gave the results expected, only thing is this line:
$localtime = $gmtime-($userinfo[timezoneoffset]*3600);
I had to chabge it to:
$localtime = $gmtime+14400+($userinfo[timezoneoffset]*3600);
So that I can get the correct time, this might be my server, but it worked!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.