<?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 => 'fr',
  ),
  'this' => 
  array (
    0 => 'function.geoip-time-zone-by-country-and-region.php',
    1 => 'geoip_time_zone_by_country_and_region',
    2 => 'Retourne le fuseau horaire de certains pays et r&eacute;gion du globe',
  ),
  'up' => 
  array (
    0 => 'ref.geoip.php',
    1 => 'Fonctions GeoIP',
  ),
  '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' => 'fr',
    '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">Retourne le fuseau horaire de certains pays et région du globe</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.geoip-time-zone-by-country-and-region-description">
  <h3 class="title">Description</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">
   <span class="function"><strong>geoip_time_zone_by_country_and_region()</strong></span> retourne le fuseau horaire
   correspondant à un pays et une région.
  </p>
  <p class="simpara">
   Aux États-Unis d&#039;Amérique, la région correspond à l&#039;abréviation en deux lettres de
   l&#039;état. Au Canada, cette région correspond à l&#039;abréviation de la province ou du
   territoire, tel qu&#039;attribué par Poste Canada.
  </p>
  <p class="simpara">
   Pour le reste du monde, GeoIP utilise les codes FIPS 10-4 pour représenter les régions.
   Il est possible de vérifier le site <a href="http://www.maxmind.com/app/fips10_4" class="link external">&raquo;&nbsp;http://www.maxmind.com/app/fips10_4</a>
   pour une liste détaillée des codes FIPS 10-4.
  </p>
  <p class="simpara">
   Cette fonction est toujours disponible, si l&#039;on utilise GeoIP Library
   version 1.4.1 ou plus récent. Les données sont issues directement de GeoIP
   Library et non pas d&#039;une table de référence.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.geoip-time-zone-by-country-and-region-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <dl>
   
    <dt><code class="parameter">country_code</code></dt>
    <dd>
     <span class="simpara">
      Le code de pays, en deux lettres (voir
      <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">
      Le code de région en deux lettres (voir
      <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">Valeurs de retour</h3>
  <p class="simpara">
   Retourne le fuseau horaire en cas de succès, et <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> si le pays,
   la région ou la combinaison des deux n&#039;a pas pu être trouvée.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.geoip-time-zone-by-country-and-region-examples">
  <h3 class="title">Exemples</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Exemple #1 Exemple avec <span class="function"><strong>geoip_time_zone_by_country_and_region()</strong></span> pour les USA et Canada</strong></p>
    <div class="example-contents"><p>
     Ce script va afficher le fuseau horaire pour le Québec, au Canada.
    </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">'Fuseau horaire de CA/QC : ' </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>L&#039;exemple ci-dessus va afficher :</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Fuseau horaire de CA/QC : America/Montreal</pre>
</div>
    </div>
   </div>
   <div class="example" id="example-2">
    <p><strong>Exemple #2 Exemple avec <span class="function"><strong>geoip_time_zone_by_country_and_region()</strong></span> et les codes FIPS</strong></p>
    <div class="example-contents"><p>
     Ce script va afficher le fuseau horaire du Japon, région 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">'Fuseau horaire de JP/01 : ' </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>L&#039;exemple ci-dessus va afficher :</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Fuseau horaire de JP/01 : Asia/Tokyo</pre>
</div>
    </div>
   </div>
  </p>
 </div>


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