1
mirror of https://github.com/jakejarvis/spoons.git synced 2025-06-29 02:05:40 -04:00

correct timezone for Scrabble's web server and database server

This commit is contained in:
2013-05-19 18:00:23 -04:00
parent 39f4be98fe
commit 246969726b
3 changed files with 5 additions and 3 deletions

View File

@ -10,6 +10,8 @@
$db_pass = "lol"; $db_pass = "lol";
$db_name = "spoons"; $db_name = "spoons";
$timezone_number = "-4:00";
$timezone_name = "America/New_York";
date_default_timezone_set("America/New_York"); date_default_timezone_set($timezone_name);
?> ?>

View File

@ -2,5 +2,5 @@
mysql_connect($db_host . ":" . $db_port, $db_user, $db_pass); mysql_connect($db_host . ":" . $db_port, $db_user, $db_pass);
mysql_select_db($db_name); mysql_select_db($db_name);
mysql_query('SET time_zone = "America/New_York"'); mysql_query('SET time_zone = "' . $timezone_number . '"');
?> ?>

View File

@ -125,7 +125,7 @@ function checkSpoonedByID($id) {
} }
function spoonByID($id) { function spoonByID($id) {
mysql_query('SET time_zone = "America/New_York"'); mysql_query('SET time_zone = "' . $timezone_number . '"');
mysql_query("UPDATE spooners SET spooned_by = " . getReverseTargetByID($id) . ", time_spooned = NOW(), spooned = 1, order_num = -1 WHERE id = " . $id); mysql_query("UPDATE spooners SET spooned_by = " . getReverseTargetByID($id) . ", time_spooned = NOW(), spooned = 1, order_num = -1 WHERE id = " . $id);
} }