Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 833

qtbase5-doc-5.9.4-1.1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qtimezone.cpp -->
  <title>QTimeZone Class | Qt Core 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtcore-index.html">Qt Core</a></td><td ><a href="qtcore-module.html">C++ Classes</a></td><td >QTimeZone</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#iana-time-zone-ids">IANA Time Zone IDs</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QTimeZone Class</h1>
<!-- $$$QTimeZone-brief -->
<p>The <a href="qtimezone.html">QTimeZone</a> class converts between UTC and local time in a specific time zone. <a href="#details">More...</a></p>
<!-- @@@QTimeZone -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QTimeZone&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += core</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 5.2</td></tr></table></div><ul>
<li><a href="qtimezone-members.html">List of all members, including inherited members</a></li>
</ul>
<p><b>Note:</b> All functions in this class are thread-safe.</p>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="qtimezone-offsetdata.html">OffsetData</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#NameType-enum">NameType</a></b> { DefaultName, LongName, ShortName, OffsetName }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#OffsetDataList-typedef">OffsetDataList</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#TimeType-enum">TimeType</a></b> { StandardTime, DaylightTime, GenericTime }</td></tr>
</table></div>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#QTimeZone">QTimeZone</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#QTimeZone-1">QTimeZone</a></b>(const QByteArray &amp;<i>ianaId</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#QTimeZone-2">QTimeZone</a></b>(int <i>offsetSeconds</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#QTimeZone-3">QTimeZone</a></b>(const QByteArray &amp;<i>ianaId</i>, int <i>offsetSeconds</i>, const QString &amp;<i>name</i>, const QString &amp;<i>abbreviation</i>, QLocale::Country <i>country</i> = QLocale::AnyCountry, const QString &amp;<i>comment</i> = QString())</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#QTimeZone-4">QTimeZone</a></b>(const QTimeZone &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#dtor.QTimeZone">~QTimeZone</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#abbreviation">abbreviation</a></b>(const QDateTime &amp;<i>atDateTime</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#comment">comment</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QLocale::Country </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#country">country</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#daylightTimeOffset">daylightTimeOffset</a></b>(const QDateTime &amp;<i>atDateTime</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#displayName">displayName</a></b>(const QDateTime &amp;<i>atDateTime</i>, QTimeZone::NameType <i>nameType</i> = QTimeZone::DefaultName, const QLocale &amp;<i>locale</i> = QLocale()) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#displayName-1">displayName</a></b>(QTimeZone::TimeType <i>timeType</i>, QTimeZone::NameType <i>nameType</i> = QTimeZone::DefaultName, const QLocale &amp;<i>locale</i> = QLocale()) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#hasDaylightTime">hasDaylightTime</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#hasTransitions">hasTransitions</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#id">id</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#isDaylightTime">isDaylightTime</a></b>(const QDateTime &amp;<i>atDateTime</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#isValid">isValid</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> OffsetData </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#nextTransition">nextTransition</a></b>(const QDateTime &amp;<i>afterDateTime</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> OffsetData </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#offsetData">offsetData</a></b>(const QDateTime &amp;<i>forDateTime</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#offsetFromUtc">offsetFromUtc</a></b>(const QDateTime &amp;<i>atDateTime</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> OffsetData </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#previousTransition">previousTransition</a></b>(const QDateTime &amp;<i>beforeDateTime</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#standardTimeOffset">standardTimeOffset</a></b>(const QDateTime &amp;<i>atDateTime</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#swap">swap</a></b>(QTimeZone &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> CFTimeZoneRef </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#toCFTimeZone">toCFTimeZone</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> NSTimeZone *</td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#toNSTimeZone">toNSTimeZone</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> OffsetDataList </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#transitions">transitions</a></b>(const QDateTime &amp;<i>fromDateTime</i>, const QDateTime &amp;<i>toDateTime</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#operator-not-eq">operator!=</a></b>(const QTimeZone &amp;<i>other</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTimeZone &amp;</td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#operator-eq">operator=</a></b>(const QTimeZone &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTimeZone &amp;</td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#operator-eq-1">operator=</a></b>(QTimeZone &amp;&amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#operator-eq-eq">operator==</a></b>(const QTimeZone &amp;<i>other</i>) const</td></tr>
</table></div>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QByteArray&gt; </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#availableTimeZoneIds">availableTimeZoneIds</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QByteArray&gt; </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#availableTimeZoneIds-1">availableTimeZoneIds</a></b>(QLocale::Country <i>country</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QByteArray&gt; </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#availableTimeZoneIds-2">availableTimeZoneIds</a></b>(int <i>offsetSeconds</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTimeZone </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#fromCFTimeZone">fromCFTimeZone</a></b>(CFTimeZoneRef <i>timeZone</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTimeZone </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#fromNSTimeZone">fromNSTimeZone</a></b>(const NSTimeZone *<i>timeZone</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#ianaIdToWindowsId">ianaIdToWindowsId</a></b>(const QByteArray &amp;<i>ianaId</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#isTimeZoneIdAvailable">isTimeZoneIdAvailable</a></b>(const QByteArray &amp;<i>ianaId</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTimeZone </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#systemTimeZone">systemTimeZone</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#systemTimeZoneId">systemTimeZoneId</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTimeZone </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#utc">utc</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#windowsIdToDefaultIanaId">windowsIdToDefaultIanaId</a></b>(const QByteArray &amp;<i>windowsId</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#windowsIdToDefaultIanaId-1">windowsIdToDefaultIanaId</a></b>(const QByteArray &amp;<i>windowsId</i>, QLocale::Country <i>country</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QByteArray&gt; </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#windowsIdToIanaIds">windowsIdToIanaIds</a></b>(const QByteArray &amp;<i>windowsId</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QByteArray&gt; </td><td class="memItemRight bottomAlign"><b><a href="qtimezone.html#windowsIdToIanaIds-1">windowsIdToIanaIds</a></b>(const QByteArray &amp;<i>windowsId</i>, QLocale::Country <i>country</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QTimeZone-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qtimezone.html">QTimeZone</a> class converts between UTC and local time in a specific time zone.</p>
<p>This class provides a stateless calculator for time zone conversions between UTC and the local time in a specific time zone. By default it uses the host system time zone data to perform these conversions.</p>
<p>This class is primarily designed for use in <a href="qdatetime.html">QDateTime</a>; most applications will not need to access this class directly and should instead use <a href="qdatetime.html">QDateTime</a> with a <a href="qt.html#TimeSpec-enum">Qt::TimeSpec</a> of <a href="qt.html#TimeSpec-enum">Qt::TimeZone</a>.</p>
<p><b>Note: </b>For consistency with <a href="qdatetime.html">QDateTime</a>, <a href="qtimezone.html">QTimeZone</a> does not account for leap seconds.</p><a name="iana-time-zone-ids"></a>
<a name="iana-time-zone-ids"></a>
<h4 >IANA Time Zone IDs</h4>
<p><a href="qtimezone.html">QTimeZone</a> uses the IANA time zone IDs as defined in the IANA Time Zone Database (http://www.iana.org/time-zones). This is to ensure a standard ID across all supported platforms. Most platforms support the IANA IDs and the IANA Database natively, but for Windows a mapping is required to the native IDs. See below for more details.</p>
<p>The IANA IDs can and do change on a regular basis, and can vary depending on how recently the host system data was updated. As such you cannot rely on any given ID existing on any host system. You must use <a href="qtimezone.html#availableTimeZoneIds">availableTimeZoneIds</a>() to determine what IANA IDs are available.</p>
<p>The IANA IDs and database are also know as the Olson IDs and database, named after their creator.</p>
<a name="utc-offset-time-zones"></a>
<h4 >UTC Offset Time Zones</h4>
<p>A default UTC time zone backend is provided which is always guaranteed to be available. This provides a set of generic Offset From UTC time zones in the range UTC-14:00 to UTC+14:00. These time zones can be created using either the standard ISO format names &quot;UTC+00:00&quot; as listed by <a href="qtimezone.html#availableTimeZoneIds">availableTimeZoneIds</a>(), or using the number of offset seconds.</p>
<a name="windows-time-zones"></a>
<h4 >Windows Time Zones</h4>
<p>Windows native time zone support is severely limited compared to the standard IANA TZ Database. Windows time zones cover larger geographic areas and are thus less accurate in their conversions. They also do not support as much historic conversion data and so may only be accurate for the current year.</p>
<p><a href="qtimezone.html">QTimeZone</a> uses a conversion table derived form the Unicode CLDR data to map between IANA IDs and Windows IDs. Depending on your version of Windows and Qt, this table may not be able to provide a valid conversion, in which &quot;UTC&quot; will be returned.</p>
<p><a href="qtimezone.html">QTimeZone</a> provides a public API to use this conversion table. The Windows ID used is the Windows Registry Key for the time zone which is also the MS Exchange EWS ID as well, but is different to the Time Zone Name (TZID) and COD code used by MS Exchange in versions before 2007.</p>
<a name="system-time-zone"></a>
<h4 >System Time Zone</h4>
<p><a href="qtimezone.html">QTimeZone</a> does not support any concept of a system or default time zone. If you require a <a href="qdatetime.html">QDateTime</a> that uses the current system time zone at any given moment then you should use a <a href="qt.html#TimeSpec-enum">Qt::TimeSpec</a> of <a href="qt.html#TimeSpec-enum">Qt::LocalTime</a>.</p>
<p>The method <a href="qtimezone.html#systemTimeZoneId">systemTimeZoneId</a>() returns the current system IANA time zone ID which on Unix-like systems will always be correct. On Windows this ID is translated from the Windows system ID using an internal translation table and the user's selected country. As a consequence there is a small chance any Windows install may have IDs not known by Qt, in which case &quot;UTC&quot; will be returned.</p>
<p>Creating a new <a href="qtimezone.html">QTimeZone</a> instance using the system time zone ID will only produce a fixed named copy of the time zone, it will not change if the system time zone changes.</p>
<a name="time-zone-offsets"></a>
<h4 >Time Zone Offsets</h4>
<p>The difference between UTC and the local time in a time zone is expressed as an offset in seconds from UTC, i.e&#x2e; the number of seconds to add to UTC to obtain the local time. The total offset is comprised of two component parts, the standard time offset and the daylight-saving time offset. The standard time offset is the number of seconds to add to UTC to obtain standard time in the time zone. The daylight-saving time offset is the number of seconds to add to the standard time offset to obtain daylight-saving time (abbreviated DST and sometimes called &quot;daylight time&quot; or &quot;summer time&quot;) in the time zone.</p>
<p>Note that the standard and DST offsets for a time zone may change over time as countries have changed DST laws or even their standard time offset.</p>
<a name="license"></a>
<h4 >License</h4>
<p>This class includes data obtained from the CLDR data files under the terms of the Unicode Data Files and Software License. See <a href="qtcore-attribution-cldr-data.html">Unicode CLDR (Unicode Common Locale Data Repository)</a> for the details.</p>
</div>
<p><b>See also </b><a href="qdatetime.html">QDateTime</a>.</p>
<!-- @@@QTimeZone -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$NameType$$$DefaultName$$$LongName$$$ShortName$$$OffsetName -->
<h3 class="fn" id="NameType-enum"><a name="NameType-enum"></a>enum QTimeZone::<span class="name">NameType</span></h3>
<p>The type of time zone name.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QTimeZone::DefaultName</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The default form of the time zone name, e.g&#x2e; LongName, ShortName or OffsetName</td></tr>
<tr><td class="topAlign"><code>QTimeZone::LongName</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The long form of the time zone name, e.g&#x2e; &quot;Central European Time&quot;</td></tr>
<tr><td class="topAlign"><code>QTimeZone::ShortName</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The short form of the time zone name, usually an abbreviation, e.g&#x2e; &quot;CET&quot;</td></tr>
<tr><td class="topAlign"><code>QTimeZone::OffsetName</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">The standard ISO offset form of the time zone name, e.g&#x2e; &quot;UTC+01:00&quot;</td></tr>
</table></div>
<!-- @@@NameType -->
<!-- $$$OffsetDataList -->
<h3 class="fn" id="OffsetDataList-typedef"><a name="OffsetDataList-typedef"></a>typedef QTimeZone::<span class="name">OffsetDataList</span></h3>
<p>Synonym for <a href="qvector.html">QVector</a>&lt;<a href="qtimezone-offsetdata.html">OffsetData</a>&gt;.</p>
<!-- @@@OffsetDataList -->
<!-- $$$TimeType$$$StandardTime$$$DaylightTime$$$GenericTime -->
<h3 class="fn" id="TimeType-enum"><a name="TimeType-enum"></a>enum QTimeZone::<span class="name">TimeType</span></h3>
<p>The type of time zone time, for example when requesting the name. In time zones that do not apply DST, all three values may return the same result.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QTimeZone::StandardTime</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The standard time in a time zone, i.e&#x2e; when Daylight-Saving is not in effect. For example when formatting a display name this will show something like &quot;Pacific Standard Time&quot;.</td></tr>
<tr><td class="topAlign"><code>QTimeZone::DaylightTime</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">A time when Daylight-Saving is in effect. For example when formatting a display name this will show something like &quot;Pacific daylight-saving time&quot;.</td></tr>
<tr><td class="topAlign"><code>QTimeZone::GenericTime</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">A time which is not specifically Standard or Daylight-Saving time, either an unknown time or a neutral form. For example when formatting a display name this will show something like &quot;Pacific Time&quot;.</td></tr>
</table></div>
<!-- @@@TimeType -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QTimeZone[overload1]$$$QTimeZone -->
<h3 class="fn" id="QTimeZone"><a name="QTimeZone"></a>QTimeZone::<span class="name">QTimeZone</span>()</h3>
<p>Create a null/invalid time zone instance.</p>
<!-- @@@QTimeZone -->
<!-- $$$QTimeZone$$$QTimeZoneconstQByteArray& -->
<h3 class="fn" id="QTimeZone-1"><a name="QTimeZone-1"></a>QTimeZone::<span class="name">QTimeZone</span>(const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp;<i>ianaId</i>)</h3>
<p>Creates an instance of the requested time zone <i>ianaId</i>.</p>
<p>The ID must be one of the available system IDs otherwise an invalid time zone will be returned.</p>
<p><b>See also </b><a href="qtimezone.html#availableTimeZoneIds">availableTimeZoneIds</a>().</p>
<!-- @@@QTimeZone -->
<!-- $$$QTimeZone$$$QTimeZoneint -->
<h3 class="fn" id="QTimeZone-2"><a name="QTimeZone-2"></a>QTimeZone::<span class="name">QTimeZone</span>(<span class="type">int</span> <i>offsetSeconds</i>)</h3>
<p>Creates an instance of a time zone with the requested Offset from UTC of <i>offsetSeconds</i>.</p>
<p>The <i>offsetSeconds</i> from UTC must be in the range -14 hours to +14 hours otherwise an invalid time zone will be returned.</p>
<!-- @@@QTimeZone -->
<!-- $$$QTimeZone$$$QTimeZoneconstQByteArray&intconstQString&constQString&QLocale::CountryconstQString& -->
<h3 class="fn" id="QTimeZone-3"><a name="QTimeZone-3"></a>QTimeZone::<span class="name">QTimeZone</span>(const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp;<i>ianaId</i>, <span class="type">int</span> <i>offsetSeconds</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>name</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>abbreviation</i>, <span class="type"><a href="qlocale.html#Country-enum">QLocale::Country</a></span> <i>country</i> = QLocale::AnyCountry, const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>comment</i> = QString())</h3>
<p>Creates a custom time zone with an ID of <i>ianaId</i> and an offset from UTC of <i>offsetSeconds</i>. The <i>name</i> will be the name used by <a href="qtimezone.html#displayName">displayName</a>() for the <a href="qtimezone.html#NameType-enum">LongName</a>, the <i>abbreviation</i> will be used by <a href="qtimezone.html#displayName">displayName</a>() for the <a href="qtimezone.html#NameType-enum">ShortName</a> and by <a href="qtimezone.html#abbreviation">abbreviation</a>(), and the optional <i>country</i> will be used by <a href="qtimezone.html#country">country</a>(). The <i>comment</i> is an optional note that may be displayed in a GUI to assist users in selecting a time zone.</p>
<p>The <i>ianaId</i> must not be one of the available system IDs returned by <a href="qtimezone.html#availableTimeZoneIds">availableTimeZoneIds</a>(). The <i>offsetSeconds</i> from UTC must be in the range -14 hours to +14 hours.</p>
<p>If the custom time zone does not have a specific country then set it to the default value of <a href="qlocale.html#Country-enum">QLocale::AnyCountry</a>.</p>
<!-- @@@QTimeZone -->
<!-- $$$QTimeZone$$$QTimeZoneconstQTimeZone& -->
<h3 class="fn" id="QTimeZone-4"><a name="QTimeZone-4"></a>QTimeZone::<span class="name">QTimeZone</span>(const <span class="type"><a href="qtimezone.html#QTimeZone">QTimeZone</a></span> &amp;<i>other</i>)</h3>
<p>Copy constructor, copy <i>other</i> to this.</p>
<!-- @@@QTimeZone -->
<!-- $$$~QTimeZone[overload1]$$$~QTimeZone -->
<h3 class="fn" id="dtor.QTimeZone"><a name="dtor.QTimeZone"></a>QTimeZone::<span class="name">~QTimeZone</span>()</h3>
<p>Destroys the time zone.</p>
<!-- @@@~QTimeZone -->
<!-- $$$abbreviation[overload1]$$$abbreviationconstQDateTime& -->
<h3 class="fn" id="abbreviation"><a name="abbreviation"></a><span class="type"><a href="qstring.html">QString</a></span> QTimeZone::<span class="name">abbreviation</span>(const <span class="type"><a href="qdatetime.html">QDateTime</a></span> &amp;<i>atDateTime</i>) const</h3>
<p>Returns the time zone abbreviation at the given <i>atDateTime</i>. The abbreviation may change depending on DST or even historical events.</p>
<p>Note that the abbreviation is not guaranteed to be unique to this time zone and should not be used in place of the ID or display name.</p>
<p><b>See also </b><a href="qtimezone.html#displayName">displayName</a>().</p>
<!-- @@@abbreviation -->
<!-- $$$availableTimeZoneIds[overload1]$$$availableTimeZoneIds -->
<h3 class="fn" id="availableTimeZoneIds"><a name="availableTimeZoneIds"></a><code>[static] </code><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qbytearray.html">QByteArray</a></span>&gt; QTimeZone::<span class="name">availableTimeZoneIds</span>()</h3>
<p>Returns a list of all available IANA time zone IDs on this system.</p>
<p><b>See also </b><a href="qtimezone.html#isTimeZoneIdAvailable">isTimeZoneIdAvailable</a>().</p>
<!-- @@@availableTimeZoneIds -->
<!-- $$$availableTimeZoneIds$$$availableTimeZoneIdsQLocale::Country -->
<h3 class="fn" id="availableTimeZoneIds-1"><a name="availableTimeZoneIds-1"></a><code>[static] </code><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qbytearray.html">QByteArray</a></span>&gt; QTimeZone::<span class="name">availableTimeZoneIds</span>(<span class="type"><a href="qlocale.html#Country-enum">QLocale::Country</a></span> <i>country</i>)</h3>
<p>Returns a list of all available IANA time zone IDs for a given <i>country</i>.</p>
<p>As a special case, a <i>country</i> of Qt::AnyCountry returns those time zones that do not have any country related to them, such as UTC. If you require a list of all time zone IDs for all countries then use the standard <a href="qtimezone.html#availableTimeZoneIds">availableTimeZoneIds</a>() method.</p>
<p><b>See also </b><a href="qtimezone.html#isTimeZoneIdAvailable">isTimeZoneIdAvailable</a>().</p>
<!-- @@@availableTimeZoneIds -->
<!-- $$$availableTimeZoneIds$$$availableTimeZoneIdsint -->
<h3 class="fn" id="availableTimeZoneIds-2"><a name="availableTimeZoneIds-2"></a><code>[static] </code><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qbytearray.html">QByteArray</a></span>&gt; QTimeZone::<span class="name">availableTimeZoneIds</span>(<span class="type">int</span> <i>offsetSeconds</i>)</h3>
<p>Returns a list of all available IANA time zone IDs with a given standard time offset of <i>offsetSeconds</i>.</p>
<p><b>See also </b><a href="qtimezone.html#isTimeZoneIdAvailable">isTimeZoneIdAvailable</a>().</p>
<!-- @@@availableTimeZoneIds -->
<!-- $$$comment[overload1]$$$comment -->
<h3 class="fn" id="comment"><a name="comment"></a><span class="type"><a href="qstring.html">QString</a></span> QTimeZone::<span class="name">comment</span>() const</h3>
<p>Returns any comment for the time zone.</p>
<p>A comment may be provided by the host platform to assist users in choosing the correct time zone. Depending on the platform this may not be localized.</p>
<!-- @@@comment -->
<!-- $$$country[overload1]$$$country -->
<h3 class="fn" id="country"><a name="country"></a><span class="type"><a href="qlocale.html#Country-enum">QLocale::Country</a></span> QTimeZone::<span class="name">country</span>() const</h3>
<p>Returns the country for the time zone.</p>
<!-- @@@country -->
<!-- $$$daylightTimeOffset[overload1]$$$daylightTimeOffsetconstQDateTime& -->
<h3 class="fn" id="daylightTimeOffset"><a name="daylightTimeOffset"></a><span class="type">int</span> QTimeZone::<span class="name">daylightTimeOffset</span>(const <span class="type"><a href="qdatetime.html">QDateTime</a></span> &amp;<i>atDateTime</i>) const</h3>
<p>Returns the daylight-saving time offset at the given <i>atDateTime</i>, i.e&#x2e; the number of seconds to add to the standard time offset to obtain the local daylight-saving time.</p>
<p>For example, for the time zone &quot;Europe/Berlin&quot; the DST offset is +3600 seconds. During standard time daylightTimeOffset() will return 0, and when daylight-saving is in effect it will return +3600.</p>
<p><b>See also </b><a href="qtimezone.html#offsetFromUtc">offsetFromUtc</a>() and <a href="qtimezone.html#standardTimeOffset">standardTimeOffset</a>().</p>
<!-- @@@daylightTimeOffset -->
<!-- $$$displayName[overload1]$$$displayNameconstQDateTime&QTimeZone::NameTypeconstQLocale& -->
<h3 class="fn" id="displayName"><a name="displayName"></a><span class="type"><a href="qstring.html">QString</a></span> QTimeZone::<span class="name">displayName</span>(const <span class="type"><a href="qdatetime.html">QDateTime</a></span> &amp;<i>atDateTime</i>, <span class="type"><a href="qtimezone.html#NameType-enum">QTimeZone::NameType</a></span> <i>nameType</i> = QTimeZone::DefaultName, const <span class="type"><a href="qlocale.html">QLocale</a></span> &amp;<i>locale</i> = QLocale()) const</h3>
<p>Returns the localized time zone display name at the given <i>atDateTime</i> for the given <i>nameType</i> in the given <i>locale</i>. The <i>nameType</i> and <i>locale</i> requested may not be supported on all platforms, in which case the best available option will be returned.</p>
<p>If the <i>locale</i> is not provided then the application default locale will be used.</p>
<p>The display name may change depending on DST or historical events.</p>
<p><b>See also </b><a href="qtimezone.html#abbreviation">abbreviation</a>().</p>
<!-- @@@displayName -->
<!-- $$$displayName$$$displayNameQTimeZone::TimeTypeQTimeZone::NameTypeconstQLocale& -->
<h3 class="fn" id="displayName-1"><a name="displayName-1"></a><span class="type"><a href="qstring.html">QString</a></span> QTimeZone::<span class="name">displayName</span>(<span class="type"><a href="qtimezone.html#TimeType-enum">QTimeZone::TimeType</a></span> <i>timeType</i>, <span class="type"><a href="qtimezone.html#NameType-enum">QTimeZone::NameType</a></span> <i>nameType</i> = QTimeZone::DefaultName, const <span class="type"><a href="qlocale.html">QLocale</a></span> &amp;<i>locale</i> = QLocale()) const</h3>
<p>Returns the localized time zone display name for the given <i>timeType</i> and <i>nameType</i> in the given <i>locale</i>. The <i>nameType</i> and <i>locale</i> requested may not be supported on all platforms, in which case the best available option will be returned.</p>
<p>If the <i>locale</i> is not provided then the application default locale will be used.</p>
<p>Where the time zone display names have changed over time then the most recent names will be used.</p>
<p><b>See also </b><a href="qtimezone.html#abbreviation">abbreviation</a>().</p>
<!-- @@@displayName -->
<!-- $$$fromCFTimeZone[overload1]$$$fromCFTimeZoneCFTimeZoneRef -->
<h3 class="fn" id="fromCFTimeZone"><a name="fromCFTimeZone"></a><code>[static] </code><span class="type"><a href="qtimezone.html#QTimeZone">QTimeZone</a></span> QTimeZone::<span class="name">fromCFTimeZone</span>(<span class="type">CFTimeZoneRef</span> <i>timeZone</i>)</h3>
<p>Constructs a new <a href="qtimezone.html">QTimeZone</a> containing a copy of the CFTimeZone <i>timeZone</i>.</p>
<p>This function was introduced in  Qt 5.9.</p>
<p><b>See also </b><a href="qtimezone.html#toCFTimeZone">toCFTimeZone</a>().</p>
<!-- @@@fromCFTimeZone -->
<!-- $$$fromNSTimeZone[overload1]$$$fromNSTimeZoneconstNSTimeZone* -->
<h3 class="fn" id="fromNSTimeZone"><a name="fromNSTimeZone"></a><code>[static] </code><span class="type"><a href="qtimezone.html#QTimeZone">QTimeZone</a></span> QTimeZone::<span class="name">fromNSTimeZone</span>(const <span class="type">NSTimeZone</span> *<i>timeZone</i>)</h3>
<p>Constructs a new <a href="qtimezone.html">QTimeZone</a> containing a copy of the NSTimeZone <i>timeZone</i>.</p>
<p>This function was introduced in  Qt 5.9.</p>
<p><b>See also </b><a href="qtimezone.html#toNSTimeZone">toNSTimeZone</a>().</p>
<!-- @@@fromNSTimeZone -->
<!-- $$$hasDaylightTime[overload1]$$$hasDaylightTime -->
<h3 class="fn" id="hasDaylightTime"><a name="hasDaylightTime"></a><span class="type">bool</span> QTimeZone::<span class="name">hasDaylightTime</span>() const</h3>
<p>Returns <code>true</code> if the time zone has practiced daylight-saving at any time.</p>
<p><b>See also </b><a href="qtimezone.html#isDaylightTime">isDaylightTime</a>() and <a href="qtimezone.html#daylightTimeOffset">daylightTimeOffset</a>().</p>
<!-- @@@hasDaylightTime -->
<!-- $$$hasTransitions[overload1]$$$hasTransitions -->
<h3 class="fn" id="hasTransitions"><a name="hasTransitions"></a><span class="type">bool</span> QTimeZone::<span class="name">hasTransitions</span>() const</h3>
<p>Returns <code>true</code> if the system backend supports obtaining transitions.</p>
<p>Transitions are changes in the time-zone: these happen when DST turns on or off and when authorities alter the offsets for the time-zone.</p>
<p><b>See also </b><a href="qtimezone.html#nextTransition">nextTransition</a>(), <a href="qtimezone.html#previousTransition">previousTransition</a>(), and <a href="qtimezone.html#transitions">transitions</a>().</p>
<!-- @@@hasTransitions -->
<!-- $$$ianaIdToWindowsId[overload1]$$$ianaIdToWindowsIdconstQByteArray& -->
<h3 class="fn" id="ianaIdToWindowsId"><a name="ianaIdToWindowsId"></a><code>[static] </code><span class="type"><a href="qbytearray.html">QByteArray</a></span> QTimeZone::<span class="name">ianaIdToWindowsId</span>(const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp;<i>ianaId</i>)</h3>
<p>Returns the Windows ID equivalent to the given <i>ianaId</i>.</p>
<p><b>See also </b><a href="qtimezone.html#windowsIdToDefaultIanaId">windowsIdToDefaultIanaId</a>() and <a href="qtimezone.html#windowsIdToIanaIds">windowsIdToIanaIds</a>().</p>
<!-- @@@ianaIdToWindowsId -->
<!-- $$$id[overload1]$$$id -->
<h3 class="fn" id="id"><a name="id"></a><span class="type"><a href="qbytearray.html">QByteArray</a></span> QTimeZone::<span class="name">id</span>() const</h3>
<p>Returns the IANA ID for the time zone.</p>
<p>IANA IDs are used on all platforms. On Windows these are translated from the Windows ID into the closest IANA ID for the time zone and country.</p>
<!-- @@@id -->
<!-- $$$isDaylightTime[overload1]$$$isDaylightTimeconstQDateTime& -->
<h3 class="fn" id="isDaylightTime"><a name="isDaylightTime"></a><span class="type">bool</span> QTimeZone::<span class="name">isDaylightTime</span>(const <span class="type"><a href="qdatetime.html">QDateTime</a></span> &amp;<i>atDateTime</i>) const</h3>
<p>Returns <code>true</code> if daylight-saving was in effect at the given <i>atDateTime</i>.</p>
<p><b>See also </b><a href="qtimezone.html#hasDaylightTime">hasDaylightTime</a>() and <a href="qtimezone.html#daylightTimeOffset">daylightTimeOffset</a>().</p>
<!-- @@@isDaylightTime -->
<!-- $$$isTimeZoneIdAvailable[overload1]$$$isTimeZoneIdAvailableconstQByteArray& -->
<h3 class="fn" id="isTimeZoneIdAvailable"><a name="isTimeZoneIdAvailable"></a><code>[static] </code><span class="type">bool</span> QTimeZone::<span class="name">isTimeZoneIdAvailable</span>(const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp;<i>ianaId</i>)</h3>
<p>Returns <code>true</code> if a given time zone <i>ianaId</i> is available on this system.</p>
<p><b>See also </b><a href="qtimezone.html#availableTimeZoneIds">availableTimeZoneIds</a>().</p>
<!-- @@@isTimeZoneIdAvailable -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn" id="isValid"><a name="isValid"></a><span class="type">bool</span> QTimeZone::<span class="name">isValid</span>() const</h3>
<p>Returns <code>true</code> if this time zone is valid.</p>
<!-- @@@isValid -->
<!-- $$$nextTransition[overload1]$$$nextTransitionconstQDateTime& -->
<h3 class="fn" id="nextTransition"><a name="nextTransition"></a><span class="type"><a href="qtimezone-offsetdata.html">OffsetData</a></span> QTimeZone::<span class="name">nextTransition</span>(const <span class="type"><a href="qdatetime.html">QDateTime</a></span> &amp;<i>afterDateTime</i>) const</h3>
<p>Returns the first time zone Transition after the given <i>afterDateTime</i>. This is most useful when you have a Transition time and wish to find the Transition after it.</p>
<p>If there is no transition after the given <i>afterDateTime</i> then an invalid <a href="qtimezone-offsetdata.html">OffsetData</a> will be returned with an invalid <a href="qdatetime.html">QDateTime</a>.</p>
<p>The given <i>afterDateTime</i> is exclusive.</p>
<p><b>See also </b><a href="qtimezone.html#hasTransitions">hasTransitions</a>(), <a href="qtimezone.html#previousTransition">previousTransition</a>(), and <a href="qtimezone.html#transitions">transitions</a>().</p>
<!-- @@@nextTransition -->
<!-- $$$offsetData[overload1]$$$offsetDataconstQDateTime& -->
<h3 class="fn" id="offsetData"><a name="offsetData"></a><span class="type"><a href="qtimezone-offsetdata.html">OffsetData</a></span> QTimeZone::<span class="name">offsetData</span>(const <span class="type"><a href="qdatetime.html">QDateTime</a></span> &amp;<i>forDateTime</i>) const</h3>
<p>Returns the effective offset details at the given <i>forDateTime</i>. This is the equivalent of calling <a href="qtimezone.html#offsetFromUtc">offsetFromUtc</a>(), <a href="qtimezone.html#abbreviation">abbreviation</a>(), etc individually but is more efficient.</p>
<p><b>See also </b><a href="qtimezone.html#offsetFromUtc">offsetFromUtc</a>(), <a href="qtimezone.html#standardTimeOffset">standardTimeOffset</a>(), <a href="qtimezone.html#daylightTimeOffset">daylightTimeOffset</a>(), and <a href="qtimezone.html#abbreviation">abbreviation</a>().</p>
<!-- @@@offsetData -->
<!-- $$$offsetFromUtc[overload1]$$$offsetFromUtcconstQDateTime& -->
<h3 class="fn" id="offsetFromUtc"><a name="offsetFromUtc"></a><span class="type">int</span> QTimeZone::<span class="name">offsetFromUtc</span>(const <span class="type"><a href="qdatetime.html">QDateTime</a></span> &amp;<i>atDateTime</i>) const</h3>
<p>Returns the total effective offset at the given <i>atDateTime</i>, i.e&#x2e; the number of seconds to add to UTC to obtain the local time. This includes any DST offset that may be in effect, i.e&#x2e; it is the sum of <a href="qtimezone.html#standardTimeOffset">standardTimeOffset</a>() and <a href="qtimezone.html#daylightTimeOffset">daylightTimeOffset</a>() for the given datetime.</p>
<p>For example, for the time zone &quot;Europe/Berlin&quot; the standard time offset is +3600 seconds and the DST offset is +3600 seconds. During standard time offsetFromUtc() will return +3600 (UTC+01:00), and during DST it will return +7200 (UTC+02:00).</p>
<p><b>See also </b><a href="qtimezone.html#standardTimeOffset">standardTimeOffset</a>() and <a href="qtimezone.html#daylightTimeOffset">daylightTimeOffset</a>().</p>
<!-- @@@offsetFromUtc -->
<!-- $$$previousTransition[overload1]$$$previousTransitionconstQDateTime& -->
<h3 class="fn" id="previousTransition"><a name="previousTransition"></a><span class="type"><a href="qtimezone-offsetdata.html">OffsetData</a></span> QTimeZone::<span class="name">previousTransition</span>(const <span class="type"><a href="qdatetime.html">QDateTime</a></span> &amp;<i>beforeDateTime</i>) const</h3>
<p>Returns the first time zone Transition before the given <i>beforeDateTime</i>. This is most useful when you have a Transition time and wish to find the Transition before it.</p>
<p>If there is no transition before the given <i>beforeDateTime</i> then an invalid <a href="qtimezone-offsetdata.html">OffsetData</a> will be returned with an invalid <a href="qdatetime.html">QDateTime</a>.</p>
<p>The given <i>beforeDateTime</i> is exclusive.</p>
<p><b>See also </b><a href="qtimezone.html#hasTransitions">hasTransitions</a>(), <a href="qtimezone.html#nextTransition">nextTransition</a>(), and <a href="qtimezone.html#transitions">transitions</a>().</p>
<!-- @@@previousTransition -->
<!-- $$$standardTimeOffset[overload1]$$$standardTimeOffsetconstQDateTime& -->
<h3 class="fn" id="standardTimeOffset"><a name="standardTimeOffset"></a><span class="type">int</span> QTimeZone::<span class="name">standardTimeOffset</span>(const <span class="type"><a href="qdatetime.html">QDateTime</a></span> &amp;<i>atDateTime</i>) const</h3>
<p>Returns the standard time offset at the given <i>atDateTime</i>, i.e&#x2e; the number of seconds to add to UTC to obtain the local Standard Time. This excludes any DST offset that may be in effect.</p>
<p>For example, for the time zone &quot;Europe/Berlin&quot; the standard time offset is +3600 seconds. During both standard and DST <a href="qtimezone.html#offsetFromUtc">offsetFromUtc</a>() will return +3600 (UTC+01:00).</p>
<p><b>See also </b><a href="qtimezone.html#offsetFromUtc">offsetFromUtc</a>() and <a href="qtimezone.html#daylightTimeOffset">daylightTimeOffset</a>().</p>
<!-- @@@standardTimeOffset -->
<!-- $$$swap[overload1]$$$swapQTimeZone& -->
<h3 class="fn" id="swap"><a name="swap"></a><span class="type">void</span> QTimeZone::<span class="name">swap</span>(<span class="type"><a href="qtimezone.html#QTimeZone">QTimeZone</a></span> &amp;<i>other</i>)</h3>
<p>Swaps this time zone instance with <i>other</i>. This function is very fast and never fails.</p>
<!-- @@@swap -->
<!-- $$$systemTimeZone[overload1]$$$systemTimeZone -->
<h3 class="fn" id="systemTimeZone"><a name="systemTimeZone"></a><code>[static] </code><span class="type"><a href="qtimezone.html#QTimeZone">QTimeZone</a></span> QTimeZone::<span class="name">systemTimeZone</span>()</h3>
<p>Returns a <a href="qtimezone.html">QTimeZone</a> object that refers to the local system time, as specified by <a href="qtimezone.html#systemTimeZoneId">systemTimeZoneId</a>().</p>
<p>This function was introduced in  Qt 5.5.</p>
<p><b>See also </b><a href="qtimezone.html#utc">utc</a>().</p>
<!-- @@@systemTimeZone -->
<!-- $$$systemTimeZoneId[overload1]$$$systemTimeZoneId -->
<h3 class="fn" id="systemTimeZoneId"><a name="systemTimeZoneId"></a><code>[static] </code><span class="type"><a href="qbytearray.html">QByteArray</a></span> QTimeZone::<span class="name">systemTimeZoneId</span>()</h3>
<p>Returns the current system time zone IANA ID.</p>
<p>On Windows this ID is translated from the Windows ID using an internal translation table and the user's selected country. As a consequence there is a small chance any Windows install may have IDs not known by Qt, in which case &quot;UTC&quot; will be returned.</p>
<!-- @@@systemTimeZoneId -->
<!-- $$$toCFTimeZone[overload1]$$$toCFTimeZone -->
<h3 class="fn" id="toCFTimeZone"><a name="toCFTimeZone"></a><span class="type">CFTimeZoneRef</span> QTimeZone::<span class="name">toCFTimeZone</span>() const</h3>
<p>Creates a CFTimeZone from a <a href="qtimezone.html">QTimeZone</a>. The caller owns the CFTimeZone object and is responsible for releasing it.</p>
<p>This function was introduced in  Qt 5.9.</p>
<p><b>See also </b><a href="qtimezone.html#fromCFTimeZone">fromCFTimeZone</a>().</p>
<!-- @@@toCFTimeZone -->
<!-- $$$toNSTimeZone[overload1]$$$toNSTimeZone -->
<h3 class="fn" id="toNSTimeZone"><a name="toNSTimeZone"></a><span class="type">NSTimeZone</span> *QTimeZone::<span class="name">toNSTimeZone</span>() const</h3>
<p>Creates an NSTimeZone from a <a href="qtimezone.html">QTimeZone</a>. The NSTimeZone object is autoreleased.</p>
<p>This function was introduced in  Qt 5.9.</p>
<p><b>See also </b><a href="qtimezone.html#fromNSTimeZone">fromNSTimeZone</a>().</p>
<!-- @@@toNSTimeZone -->
<!-- $$$transitions[overload1]$$$transitionsconstQDateTime&constQDateTime& -->
<h3 class="fn" id="transitions"><a name="transitions"></a><span class="type"><a href="qtimezone.html#OffsetDataList-typedef">OffsetDataList</a></span> QTimeZone::<span class="name">transitions</span>(const <span class="type"><a href="qdatetime.html">QDateTime</a></span> &amp;<i>fromDateTime</i>, const <span class="type"><a href="qdatetime.html">QDateTime</a></span> &amp;<i>toDateTime</i>) const</h3>
<p>Returns a list of all time zone transitions between the given datetimes.</p>
<p>The given <i>fromDateTime</i> and <i>toDateTime</i> are inclusive.</p>
<p><b>See also </b><a href="qtimezone.html#hasTransitions">hasTransitions</a>(), <a href="qtimezone.html#nextTransition">nextTransition</a>(), and <a href="qtimezone.html#previousTransition">previousTransition</a>().</p>
<!-- @@@transitions -->
<!-- $$$utc[overload1]$$$utc -->
<h3 class="fn" id="utc"><a name="utc"></a><code>[static] </code><span class="type"><a href="qtimezone.html#QTimeZone">QTimeZone</a></span> QTimeZone::<span class="name">utc</span>()</h3>
<p>Returns a <a href="qtimezone.html">QTimeZone</a> object that refers to UTC (Universal Time Coordinated).</p>
<p>This function was introduced in  Qt 5.5.</p>
<p><b>See also </b><a href="qtimezone.html#systemTimeZone">systemTimeZone</a>().</p>
<!-- @@@utc -->
<!-- $$$windowsIdToDefaultIanaId[overload1]$$$windowsIdToDefaultIanaIdconstQByteArray& -->
<h3 class="fn" id="windowsIdToDefaultIanaId"><a name="windowsIdToDefaultIanaId"></a><code>[static] </code><span class="type"><a href="qbytearray.html">QByteArray</a></span> QTimeZone::<span class="name">windowsIdToDefaultIanaId</span>(const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp;<i>windowsId</i>)</h3>
<p>Returns the default IANA ID for a given <i>windowsId</i>.</p>
<p>Because a Windows ID can cover several IANA IDs in several different countries, this function returns the most frequently used IANA ID with no regard for the country and should thus be used with care. It is usually best to request the default for a specific country.</p>
<p><b>See also </b><a href="qtimezone.html#ianaIdToWindowsId">ianaIdToWindowsId</a>() and <a href="qtimezone.html#windowsIdToIanaIds">windowsIdToIanaIds</a>().</p>
<!-- @@@windowsIdToDefaultIanaId -->
<!-- $$$windowsIdToDefaultIanaId$$$windowsIdToDefaultIanaIdconstQByteArray&QLocale::Country -->
<h3 class="fn" id="windowsIdToDefaultIanaId-1"><a name="windowsIdToDefaultIanaId-1"></a><code>[static] </code><span class="type"><a href="qbytearray.html">QByteArray</a></span> QTimeZone::<span class="name">windowsIdToDefaultIanaId</span>(const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp;<i>windowsId</i>, <span class="type"><a href="qlocale.html#Country-enum">QLocale::Country</a></span> <i>country</i>)</h3>
<p>Returns the default IANA ID for a given <i>windowsId</i> and <i>country</i>.</p>
<p>Because a Windows ID can cover several IANA IDs within a given country, the most frequently used IANA ID in that country is returned.</p>
<p>As a special case, <a href="qlocale.html#Country-enum">QLocale::AnyCountry</a> returns the default of those IANA IDs that do not have any specific country.</p>
<p><b>See also </b><a href="qtimezone.html#ianaIdToWindowsId">ianaIdToWindowsId</a>() and <a href="qtimezone.html#windowsIdToIanaIds">windowsIdToIanaIds</a>().</p>
<!-- @@@windowsIdToDefaultIanaId -->
<!-- $$$windowsIdToIanaIds[overload1]$$$windowsIdToIanaIdsconstQByteArray& -->
<h3 class="fn" id="windowsIdToIanaIds"><a name="windowsIdToIanaIds"></a><code>[static] </code><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qbytearray.html">QByteArray</a></span>&gt; QTimeZone::<span class="name">windowsIdToIanaIds</span>(const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp;<i>windowsId</i>)</h3>
<p>Returns all the IANA IDs for a given <i>windowsId</i>.</p>
<p>The returned list is sorted alphabetically.</p>
<p><b>See also </b><a href="qtimezone.html#ianaIdToWindowsId">ianaIdToWindowsId</a>() and <a href="qtimezone.html#windowsIdToDefaultIanaId">windowsIdToDefaultIanaId</a>().</p>
<!-- @@@windowsIdToIanaIds -->
<!-- $$$windowsIdToIanaIds$$$windowsIdToIanaIdsconstQByteArray&QLocale::Country -->
<h3 class="fn" id="windowsIdToIanaIds-1"><a name="windowsIdToIanaIds-1"></a><code>[static] </code><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qbytearray.html">QByteArray</a></span>&gt; QTimeZone::<span class="name">windowsIdToIanaIds</span>(const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp;<i>windowsId</i>, <span class="type"><a href="qlocale.html#Country-enum">QLocale::Country</a></span> <i>country</i>)</h3>
<p>Returns all the IANA IDs for a given <i>windowsId</i> and <i>country</i>.</p>
<p>As a special case <a href="qlocale.html#Country-enum">QLocale::AnyCountry</a> returns those IANA IDs that do not have any specific country.</p>
<p>The returned list is in order of frequency of usage, i.e&#x2e; larger zones within a country are listed first.</p>
<p><b>See also </b><a href="qtimezone.html#ianaIdToWindowsId">ianaIdToWindowsId</a>() and <a href="qtimezone.html#windowsIdToDefaultIanaId">windowsIdToDefaultIanaId</a>().</p>
<!-- @@@windowsIdToIanaIds -->
<!-- $$$operator!=[overload1]$$$operator!=constQTimeZone& -->
<h3 class="fn" id="operator-not-eq"><a name="operator-not-eq"></a><span class="type">bool</span> QTimeZone::<span class="name">operator!=</span>(const <span class="type"><a href="qtimezone.html#QTimeZone">QTimeZone</a></span> &amp;<i>other</i>) const</h3>
<p>Returns <code>true</code> if this time zone is not equal to the <i>other</i> time zone.</p>
<!-- @@@operator!= -->
<!-- $$$operator=[overload1]$$$operator=constQTimeZone& -->
<h3 class="fn" id="operator-eq"><a name="operator-eq"></a><span class="type"><a href="qtimezone.html#QTimeZone">QTimeZone</a></span> &amp;QTimeZone::<span class="name">operator=</span>(const <span class="type"><a href="qtimezone.html#QTimeZone">QTimeZone</a></span> &amp;<i>other</i>)</h3>
<p>Assignment operator, assign <i>other</i> to this.</p>
<!-- @@@operator= -->
<!-- $$$operator=$$$operator=QTimeZone&& -->
<h3 class="fn" id="operator-eq-1"><a name="operator-eq-1"></a><span class="type"><a href="qtimezone.html#QTimeZone">QTimeZone</a></span> &amp;QTimeZone::<span class="name">operator=</span>(<span class="type"><a href="qtimezone.html#QTimeZone">QTimeZone</a></span> &amp;&amp;<i>other</i>)</h3>
<p>Move-assigns <i>other</i> to this <a href="qtimezone.html">QTimeZone</a> instance, transferring the ownership of the managed pointer to this instance.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQTimeZone& -->
<h3 class="fn" id="operator-eq-eq"><a name="operator-eq-eq"></a><span class="type">bool</span> QTimeZone::<span class="name">operator==</span>(const <span class="type"><a href="qtimezone.html#QTimeZone">QTimeZone</a></span> &amp;<i>other</i>) const</h3>
<p>Returns <code>true</code> if this time zone is equal to the <i>other</i> time zone.</p>
<!-- @@@operator== -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>