Jump to content

PHP to show arena and quest reset time


Guest Voldemmort

Recommended Posts

Hello.

I'm currently using a script like this one to take from DB the Arena Reset Time and Daily and Weekly reset time to show on a PHP web.

The scripts looks like this.

   mysql_select_db($gdbchar);
       $gettime = mysql_query("SELECT NextArenaPointDistributionTime, NextDailyQuestResetTime, NextWeeklyQuestResetTime FROM saved_variables");
       $players = mysql_fetch_assoc($gettime)
?>

Arenas Distribution Date: <?php echo date('F j, Y - g:i a', $players['NextArenaPointDistributionTime']) ; ?>


Daily Quest Reset Time: <?php echo date('F j, Y - g:i a', $players['NextDailyQuestResetTime']) ; ?>


Weekly Quest Reset Time: <?php echo date('F j, Y - g:i a', $players['NextWeeklyQuestResetTime']) ; ?>


The result is that the script is showing the day of week that it is resetting, but the time isnt exact, it has difference of some minutes or even some hours of the time it is showing. For example the script say the Daily Quest will reset at 03 - 06 - 2010 - 2:00 AM, but it is resetting 03 - 06 - 2010 - 2:45 AM

Anyone know what is happening or what I have bad in my script?

Link to comment
Share on other sites

Just an idea...

Maybe your server time has an offset to real time?

You can tell your server to sync time with an NTP server in the web to avoid time shifts.

On linux login and type "date" to the console and see what time the machine thinks it is.

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use