<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.geoip.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.geoip-time-zone-by-country-and-region.php',
    1 => 'geoip_time_zone_by_country_and_region',
    2 => 'Returns the time zone for some country and region code combo',
  ),
  'up' => 
  array (
    0 => 'ref.geoip.php',
    1 => 'GeoIP Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.geoip-setup-custom-directory.php',
    1 => 'geoip_setup_custom_directory',
  ),
  'next' => 
  array (
    0 => 'book.fann.php',
    1 => 'FANN',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/geoip/functions/geoip-time-zone-by-country-and-region.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.geoip-time-zone-by-country-and-region" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">geoip_time_zone_by_country_and_region</h1>
  <p class="verinfo">(PECL geoip &gt;= 1.0.4)</p><p class="refpurpose"><span class="refname">geoip_time_zone_by_country_and_region</span> &mdash; <span class="dc-title">Returns the time zone for some country and region code combo</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.geoip-time-zone-by-country-and-region-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>geoip_time_zone_by_country_and_region</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$country_code</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$region_code</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>


  <p class="simpara">
   The <span class="function"><strong>geoip_time_zone_by_country_and_region()</strong></span> function will return the
   time zone corresponding to a country and region code combo.
  </p>
  <p class="simpara">
   In the United States, the region code corresponds to the two-letter abbreviation
   of each state. In Canada, the region code corresponds to the two-letter province or
   territory code as attributed by Canada Post.
  </p>
  <p class="simpara">
   For the rest of the world, GeoIP uses FIPS 10-4 codes to represent regions.
   You can check <a href="http://www.maxmind.com/app/fips10_4" class="link external">&raquo;&nbsp;http://www.maxmind.com/app/fips10_4</a>
   for a detailed list of FIPS 10-4 codes.
  </p>
  <p class="simpara">
   This function is always available if using GeoIP Library version 1.4.1 or newer. The
   data is taken directly from the GeoIP Library and not from any database.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.geoip-time-zone-by-country-and-region-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <dl>
   
    <dt><code class="parameter">country_code</code></dt>
    <dd>
     <span class="simpara">
      The two-letter country code (see
      <span class="function"><a href="function.geoip-country-code-by-name.php" class="function">geoip_country_code_by_name()</a></span>)
     </span>
    </dd>
   
   
    <dt><code class="parameter">region_code</code></dt>
    <dd>
     <span class="simpara">
      The two-letter (or digit) region code (see
      <span class="function"><a href="function.geoip-region-by-name.php" class="function">geoip_region_by_name()</a></span>)
     </span>
    </dd>
   
  </dl>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.geoip-time-zone-by-country-and-region-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="simpara">
   Returns the time zone on success, or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> if the country and region code
   combo cannot be found.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.geoip-time-zone-by-country-and-region-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 A <span class="function"><strong>geoip_time_zone_by_country_and_region()</strong></span> example using region code for US/Canada</strong></p>
    <div class="example-contents"><p>
     This will print the time zone for country CA (Canada), region QC (Quebec).
    </p></div>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$timezone </span><span style="color: #007700">= </span><span style="color: #0000BB">geoip_time_zone_by_country_and_region</span><span style="color: #007700">(</span><span style="color: #DD0000">'CA'</span><span style="color: #007700">, </span><span style="color: #DD0000">'QC'</span><span style="color: #007700">);<br />if (</span><span style="color: #0000BB">$timezone</span><span style="color: #007700">) {<br />    echo </span><span style="color: #DD0000">'Time zone for CA/QC is: ' </span><span style="color: #007700">. </span><span style="color: #0000BB">$timezone</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt folgende Ausgabe:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Time zone for CA/QC is: America/Montreal</pre>
</div>
    </div>
   </div>
   <div class="example" id="example-2">
    <p><strong>Beispiel #2 A <span class="function"><strong>geoip_time_zone_by_country_and_region()</strong></span> example using FIPS codes</strong></p>
    <div class="example-contents"><p>
     This will print the time zone for country JP (Japan), region 01 (Aichi).
    </p></div>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$timezone </span><span style="color: #007700">= </span><span style="color: #0000BB">geoip_time_zone_by_country_and_region</span><span style="color: #007700">(</span><span style="color: #DD0000">'JP'</span><span style="color: #007700">, </span><span style="color: #DD0000">'01'</span><span style="color: #007700">);<br />if (</span><span style="color: #0000BB">$timezone</span><span style="color: #007700">) {<br />    echo </span><span style="color: #DD0000">'Time zone for JP/01 is: ' </span><span style="color: #007700">. </span><span style="color: #0000BB">$timezone</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt folgende Ausgabe:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Time zone for JP/01 is: Asia/Tokyo</pre>
</div>
    </div>
   </div>
  </p>
 </div>


</div><?php manual_footer($setup); ?>