Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Show date instead of "Hours ago" etc
This discussion has been closed.
Comments
I do that so you know what time it is at this end!
Posted: Saturday, 13 January 2007 at 4:36PM (Australian Eastern Daylight Savings Time)
I live in Melbourne, the forum is hosted in the US, time difference = 14 hours...
<?php $serverdate = date("l, d F Y h:i a"); echo 'Unadjusted Server Date: <b>'.$serverdate.'</b>'; echo ' <p>'; // 14 = hours difference between server time and local time $timeadjust = (14 * 3600); $melfullbdate = date("l, n M Y h:i a",time() + $timeadjust); $month = date("M",time() + $timeadjust); $day = date("j",time() + $timeadjust); echo '<pre>Month & Day for Script:.......... '.$month.' '.$day; echo '<br>Full Melbourne Date:............. '.$melfullbdate .'</pre>'; ?>
I hope it helps.
Posted: Tuesday, 17 April 2007 at 7:59AM
We've got two installs of the forums using the one database. the older one can be found here: lansmash.com/v and the newer one here arena.lansamsh.com/v/
The newer installation thinks it's 10 hours ahead of the older one, but I can't figure out where in the code it's getting the change from!
My method is add date_default_timezone_set() in the conf/database.php (it makes all database's time correct.)
My forum's member are live in Taiwan, so I add
date_default_timezone_set('Asia/Taipei');
after the<?php
Since my forum hosted in USA, time different 16 hours (Taiwan's hour - USA's hour = 16), it will have some problems in account profile.
So I edit the themes/account_profile.php and themes/search_results_users.php, find any mktime() and change to mktime(date('H')-16).
example:
Change
<p>'.TimeDiff($this->Context, $this->User->DateFirstVisit, mktime().'</p>
to<p>'.TimeDiff($this->Context, $this->User->DateFirstVisit, mktime(date('H')-16)).'</p>
and leave timezone as is