From 3323b802471923fb79b705d9ab6d43ca88d2be10 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Thu, 2 May 2013 15:37:35 +0900 Subject: [PATCH] =?UTF-8?q?timezone=20=EC=84=A0=EC=96=B8=ED=9B=84=20mysql?= =?UTF-8?q?=20=EC=97=90=EC=84=9C=EB=8F=84=20=EC=84=A4=EC=A0=95=EB=90=98?= =?UTF-8?q?=EA=B2=8C=20=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common.php | 1 + config.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common.php b/common.php index ce258eb7b..303b4be32 100644 --- a/common.php +++ b/common.php @@ -95,6 +95,7 @@ if (file_exists($dbconfig_file)) { $connect_db = sql_connect(G4_MYSQL_HOST, G4_MYSQL_USER, G4_MYSQL_PASSWORD) or die('MySQL Connect Error!!!'); $select_db = sql_select_db(G4_MYSQL_DB, $connect_db) or die('MySQL DB Error!!!'); @mysql_query(" set names utf8 "); + if (defined(G4_TIMEZONE)) @mysql_query(" set time_zone = '".G4_TIMEZONE."'"); } else { ?> diff --git a/config.php b/config.php index cfa9fd5a2..b7c1da162 100644 --- a/config.php +++ b/config.php @@ -6,9 +6,11 @@ // 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음 define('_GNUBOARD_', true); +define('G4_TIMEZONE', 'Asia/Seoul'); + if (PHP_VERSION >= '5.3.0') { //if (function_exists("date_default_timezone_set")) date_default_timezone_set("Asia/Seoul"); - date_default_timezone_set("Asia/Seoul"); + date_default_timezone_set(G4_TIMEZONE); } //==============================================================================