<?php
function get_timezone_offset($remote_tz, $origin_tz = null, $removeDST = false) {
	
	if ($origin_tz === null) {
		if(!is_string($origin_tz = date_default_timezone_get())) {
			return false; // A UTC timestamp was returned -- bail out!
		}
	}
	
	$origin_dtz = new DateTimeZone($origin_tz);
	$remote_dtz = new DateTimeZone($remote_tz);
	$origin_dt = new DateTime("now", $origin_dtz);
	$remote_dt = new DateTime("now", $remote_dtz);
	$offset = $origin_dtz->getOffset($origin_dt) - $remote_dtz->getOffset($remote_dt);
	$offset = $offset / 3600;
	
	if ($removeDST == true) {
		//	$timezone = new DateTimeZone("Europe/London");
		$dst_active = date_format($origin_dt, "I");
		//	$transitions = $origin_dtz->getTransitions();
		$offset -= $dst_active;
		//print_r($dst_active);
	}
	
	return $offset;
}
?>