From 246969726b8d3b77dca41affff0081b14be72321 Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Sun, 19 May 2013 18:00:23 -0400 Subject: [PATCH] correct timezone for Scrabble's web server and database server --- config-sample.php | 4 +++- db_connect.php | 2 +- functions.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config-sample.php b/config-sample.php index 20b30fd..c69bb52 100644 --- a/config-sample.php +++ b/config-sample.php @@ -10,6 +10,8 @@ $db_pass = "lol"; $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); ?> \ No newline at end of file diff --git a/db_connect.php b/db_connect.php index f8b36d0..22fb193 100644 --- a/db_connect.php +++ b/db_connect.php @@ -2,5 +2,5 @@ mysql_connect($db_host . ":" . $db_port, $db_user, $db_pass); mysql_select_db($db_name); -mysql_query('SET time_zone = "America/New_York"'); +mysql_query('SET time_zone = "' . $timezone_number . '"'); ?> \ No newline at end of file diff --git a/functions.php b/functions.php index 0f04a8b..c796f73 100644 --- a/functions.php +++ b/functions.php @@ -125,7 +125,7 @@ function checkSpoonedByID($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); }