<!--// Written by Keysung Chung -->
<!--// client의 timezone offset 값을 서버에 넘기기위한 작업-->
<?php
$use_url_fm = "U";  // url 이용 (form submit는 테스트용, 폼을 이용해도 화면 refresh됨, 경로 재지정 필요)
if (Context::get('offset') == null) {  
	$rurl = $_SERVER['QUERY_STRING'];  //참고: $rurl = urlencode($_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']);
	echo "<form method='post' name='client_offset_form'>";
	echo "<input type='hidden' name='client_offset' value='' />";
	echo "</form>";
	echo "<script type='text/javascript'>";
	echo "function tz_offset() {";
	echo "var current_date = new Date( );";
	echo "var client_offset = current_date.getTimezoneOffset( )*60*(-1);";
	echo "document.client_offset_form.client_offset.value = client_offset;";
	if ($use_url_fm == "U"){ echo "location.href='?$rurl&offset=' + client_offset;"; }
	if ($use_url_fm == "F"){ echo "document.forms[1].submit();"; }
	echo "}";
	echo "onload = tz_offset;";
	echo "</script>";
} 
?>