* 108 timezones found! * Id: Dateline Standard Time, Name: (UTC-12:00) International Date Line West * Id: Samoa Standard Time, Name: (UTC+13:00) Samoa * Id: UTC-11, Name: (UTC-11:00) Coordinated Universal Time-11 * Id: Hawaiian Standard Time, Name: (UTC-10:00) Hawaii * Id: Alaskan Standard Time, Name: (UTC-09:00) Alaska * Id: Pacific Standard Time (Mexico), Name: (UTC-08:00) Baja California * Id: Pacific Standard Time, Name: (UTC-08:00) Pacific Time (US & Canada) * Id: US Mountain Standard Time, Name: (UTC-07:00) Arizona * Id: Mountain Standard Time (Mexico), Name: (UTC-07:00) Chihuahua, La Paz, Mazatlan * Id: Mountain Standard Time, Name: (UTC-07:00) Mountain Time (US & Canada) * Id: Central America Standard Time, Name: (UTC-06:00) Central America * ... etc * * Otherwise it displays: * No timezone found! */ if ($timeZoneDefinitions->count() > 0) { echo PHP_EOL . sprintf('%d timezones found!', $timeZoneDefinitions->count()) . PHP_EOL; foreach ($timeZoneDefinitions as $timeZoneDefinition) { echo sprintf('Id: %s, Name: %s', $timeZoneDefinition->getId(), $timeZoneDefinition->getName()) . PHP_EOL; } } else { echo PHP_EOL . 'No timezone found!'; } } else { /** * In this case, we get the \SoapFault object */ print_r($get->getLastErrorForMethod('\\Ews\\ServiceType\\EwsGet::GetServerTimeZones')); }