개인적인(?) 이유로 적어놓습니다. 혹시 이런 허접한 노트를 읽고서라도 도움이 될만한 내용이 있다면 알려주시면 고맙겠습니다.
* gb_member table 에 새로운 영역 추가 (mb_timezone) ; int(2), not null, 기본값 9 (한국)
* config.inc.php 맨 아래에 다음 내용 추가
$cfg[server_timezone] = -6; // 서버의 시간대 (GMT)
* now() 함수 대체 - lib.inc.php에 정의해준다.
gbupdate.php
mbupdate.php
lib.inc.php
mblogincheck.php
mbmemoupdate.php
mbmemoview.php
** 시간대계산함수 (나중에 함수손봐야함)
///시간대 계산
$time_server = -6; //캐나다
$time_local = +9; //한국
if ($time_server = $time_local) $time_offset = 0; // 시간대가 같다면 타임존 옵션 필요없음
elseif ($time_server > $time_local) { // 서버시간이 지역시간보다 빠를 경우
$time_offset = $time_server - $time_local;
if ($time_server < 0) $time_offset = -($time_offset); //서버시간이 0보다 작다면 서버시간에서 지역시간을 뺀 시간이 음수이므로
}
else { // 서버시간이 지역시간보다 느릴 경우
$time_offset = $time_local - $time_server;
if ($time_local < 0) $time_offset = -($time_offset); //지역시간이 0보다 작다면 지역시간에서 서버시간을 뺀 시간이 음수이므로
}
* gb_member table 에 새로운 영역 추가 (mb_timezone) ; int(2), not null, 기본값 9 (한국)
* config.inc.php 맨 아래에 다음 내용 추가
$cfg[server_timezone] = -6; // 서버의 시간대 (GMT)
* now() 함수 대체 - lib.inc.php에 정의해준다.
gbupdate.php
mbupdate.php
lib.inc.php
mblogincheck.php
mbmemoupdate.php
mbmemoview.php
** 시간대계산함수 (나중에 함수손봐야함)
///시간대 계산
$time_server = -6; //캐나다
$time_local = +9; //한국
if ($time_server = $time_local) $time_offset = 0; // 시간대가 같다면 타임존 옵션 필요없음
elseif ($time_server > $time_local) { // 서버시간이 지역시간보다 빠를 경우
$time_offset = $time_server - $time_local;
if ($time_server < 0) $time_offset = -($time_offset); //서버시간이 0보다 작다면 서버시간에서 지역시간을 뺀 시간이 음수이므로
}
else { // 서버시간이 지역시간보다 느릴 경우
$time_offset = $time_local - $time_server;
if ($time_local < 0) $time_offset = -($time_offset); //지역시간이 0보다 작다면 지역시간에서 서버시간을 뺀 시간이 음수이므로
}
댓글 15개
게시글 목록
| 번호 | 제목 |
|---|---|
| 136 | |
| 122 | |
| 121 | |
| 61 | |
| 118 | |
| 116 |
기타
40대의 방황
16
|
| 108 | |
| 107 | |
| 99 | |
| 98 | |
| 95 | |
| 92 | |
| 83 |
기타
자동 줄바꿈
15
|
| 81 | |
| 77 | |
| 74 | |
| 73 |
기타
T^T
14
|
| 66 | |
| 1 | |
| 50 | |
| 31 | |
| 29 | |
| 26 | |
| 25 | |
| 24 | |
| 18 | |
| 14 | |
| 10 | |
| 7 | |
| 4 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기