Files
php-doc-ru/reference/datetime/functions/timezone-name-from-abbr.xml
2011-09-09 14:13:30 +00:00

126 lines
4.2 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 49d9c2bfe70626dbb338db0943d305c01ba2522b Maintainer: tmn Status: ready -->
<!-- Reviewed: no -->
<!-- $Revision$ -->
<refentry xml:id="function.timezone-name-from-abbr" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>timezone_name_from_abbr</refname>
<refpurpose>
Возвращает временную зону в соответствии с аббревиатурой
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>timezone_name_from_abbr</methodname>
<methodparam><type>string</type><parameter>abbr</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>gmtOffset</parameter><initializer>-1</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>isdst</parameter><initializer>-1</initializer></methodparam>
</methodsynopsis>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>abbr</parameter></term>
<listitem>
<para>
Аббревиатура временной зоны.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>gmtOffset</parameter></term>
<listitem>
<para>
Смещение относительно GMT в секундах. По умолчанию -1, что означает
возврат первой найденной временной зоны, отвечающей аббревиатуре
<parameter>abbr</parameter>. В противном случае будет произведен поиск
временной зоны с заданным смещением. Если поиск завершится неудачей,
будет возвращена временная зона наиболее близкая к смещению.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>isdst</parameter></term>
<listitem>
<para>
Поправка на летнее время. По умолчанию -1, в этом случае поправка
на летнее время не учитывается. Если передана 1, смещение
<parameter>gmtOffset</parameter> учитывает действующее летнее время.
Если задан 0, <parameter>gmtOffset</parameter> рассчитывается с учетом
зимнего времени. Если <parameter>abbr</parameter> не существует,
определение временной зоны опирается только на
<parameter>gmtOffset</parameter> и <parameter>isdst</parameter>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Возвращает имя временной зоны&return.falseforfailure;.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Пример использования <function>timezone_name_from_abbr</function></title>
<programlisting role="php">
<![CDATA[
<?php
echo timezone_name_from_abbr("CET") . "\n";
echo timezone_name_from_abbr("", 3600, 0) . "\n";
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
Europe/Berlin
Europe/Paris
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>timezone_abbreviations_list</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->