<?php

include("configi.php");

$t_php_name	=	"Pacific/Auckland";

$phxcrmclient_id = $_COOKIE['phxcrmclient_id'];

$querytz = "SELECT phx_userid.idphx_userid, 1_timezones.t_php_name, 1_timezones.t_name,1_timezones.t_country FROM phx_userid INNER JOIN 1_timezones ON phx_userid.comp_timezone = 1_timezones.t_name where idphx_userid =".$phxcrmclient_id;

$resulttz=mysqli_query($conn, $querytz);

 while($rowtz=mysqli_fetch_array($resulttz)) { 
	$t_php_name	=	 $rowtz['t_php_name'];
}
//set the timzeone
date_default_timezone_set($t_php_name);

?>