Opération GetServerTimeZonesGetServerTimeZones operation

L’opération GetServerTimeZones retourne des informations à partir des définitions de fuseau horaire qui sont disponibles sur un serveur Exchange.The GetServerTimeZones operation returns information from time zone definitions that are available on an Exchange server.

En-têtes SOAPSOAP Headers

L’opération GetServerTimeZones peut utiliser les en-têtes SOAP répertoriés et décrits dans le tableau suivant.The GetServerTimeZones operation can use the SOAP headers that are listed and described in the following table.

HeaderHeader ÉlémentElement DescriptionDescription
MailboxCultureMailboxCulture
MailboxCultureMailboxCulture
Identifie la culture RFC3066 à utiliser pour accéder à la boîte aux lettres.Identifies the RFC3066 culture to be used to access the mailbox.
RequestVersionRequestVersion
RequestServerVersionRequestServerVersion
Identifie la version de schéma de la demande d’opération.Identifies the schema version for the operation request.
ServerVersionServerVersion
ServerVersionInfoServerVersionInfo
Identifie la version du serveur qui a répondu à la demande.Identifies the version of the server that responded to the request.

Exemples de requête GetServerTimeZonesGetServerTimeZones request examples

Obtention du nom et de l’identificateur de chaque fuseau horaireGetting the Name and Identifier of Each Time Zone

L’exemple de code suivant montre comment récupérer le nom et l’identificateur pour les fuseaux horaires standard est et Pacifique.The following code example shows how to retrieve the name and identifier for the Eastern Standard Time and Pacific Standard Time time zones.

CodeCode

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
               xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">
  <soap:Header>
    <t:RequestServerVersion Version="Exchange2010"/>
  </soap:Header>
  <soap:Body>
    <m:GetServerTimeZones ReturnFullTimeZoneData="false">
      <m:Ids>
        <t:Id>Eastern Standard Time</Id>
        <t:Id>Pacific Standard Time</Id>
      </m:Ids>
    </m:GetServerTimeZones>
  </soap:Body>
</soap:Envelope>

CommentairesComments

Chaque élément ID (TimeZone) contient l’identificateur d’une définition de fuseau horaire demandée.Each Id (TimeZone) element contains the identifier of a time zone definition that is being requested. Pour demander des informations pour tous les fuseaux horaires, omettez l’élément IDS de la demande.To request information for all time zones, omit the Ids element from the request.

Obtention de la définition complète de chaque fuseau horaireGetting the Full Definition of Each Time Zone

L’exemple de code suivant montre comment récupérer la définition de fuseau horaire complète pour le fuseau horaire de l’est.The following code example shows how to retrieve the full time zone definition for the Eastern Standard Time time zone.

CodeCode

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
               xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">
  <soap:Header>
    <t:RequestServerVersion Version="Exchange2010"/>
  </soap:Header>
  <soap:Body>
    <m:GetServerTimeZones ReturnFullTimeZoneData="true">
      <m:Ids>
        <t:Id>Eastern Standard Time</Id>
      </m:Ids>
    </m:GetServerTimeZones>
  </soap:Body>
</soap:Envelope>

CommentairesComments

Chaque élément ID (TimeZone) contient l’identificateur d’une définition de fuseau horaire demandée.Each Id (TimeZone) element contains the identifier of a time zone definition that is being requested. Pour demander des informations pour tous les fuseaux horaires, omettez l’élément IDS de la demande.To request information for all time zones, omit the Ids element from the request.

Exemples de réponse GetServerTimeZonesGetServerTimeZones response examples

Réception du nom et de l’identificateur du fuseau horaire uniquementReceiving the Time Zone Name and Identifier Only

L’exemple suivant de réponse GetServerTimeZones indique une réponse réussie à une requête GetServerTimeZones dans laquelle l’attribut ReturnFullTimeZoneData a été défini sur false.The following example of a GetServerTimeZones response shows a successful response to a GetServerTimeZones request in which the ReturnFullTimeZoneData attribute was set to false. La réponse contient le nom et l’identificateur pour les fuseaux horaires standard est et Pacifique.The response contains the name and identifier for the Eastern Standard Time and Pacific Standard Time time zones.

CodeCode

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
               xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Header>
    <t:ServerVersionInfo MajorVersion="14" 
                         MinorVersion="0" 
                         MajorBuildNumber="639" 
                         MinorBuildNumber="11" 
                         Version="Exchange2010" 
                         xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />
  </soap:Header>
  <soap:Body>
    <GetServerTimeZonesResponse xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
                                xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">
      <m:ResponseMessages>
        <m:GetServerTimeZonesResponseMessage ResponseClass="Success">
          <m:ResponseCode>NoError</ResponseCode>
          <m:TimeZoneDefinitions>
            <t:TimeZoneDefinition Id="Eastern Standard Time" Name="(GMT-05:00) Eastern Time (US &amp;amp; Canada)" />
            <t:TimeZoneDefinition Id="Pacific Standard Time" Name="(GMT-08:00) Pacific Time (US &amp;amp; Canada)" />
          </m:TimeZoneDefinitions>
        </m:GetServerTimeZonesResponseMessage>
      </m:ResponseMessages>
    </m:GetServerTimeZonesResponse>
  </soap:Body>
</soap:Envelope>

Réception d’une définition de fuseau horaire complèteReceiving a Full Time Zone Definition

L’exemple suivant de réponse GetServerTimeZones indique une réponse réussie à une requête GetServerTimeZones dans laquelle l’attribut ReturnFullTimeZoneData a été défini sur true.The following example of a GetServerTimeZones response shows a successful response to a GetServerTimeZones request in which the ReturnFullTimeZoneData attribute was set to true. La réponse contient la définition de fuseau horaire complète pour le fuseau horaire de l’est.The response contains the full time zone definition for the Eastern Standard Time time zone.

CodeCode

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
               xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Header>
    <t:ServerVersionInfo MajorVersion="14" 
                         MinorVersion="0" 
                         MajorBuildNumber="639" 
                         MinorBuildNumber="11" 
                         Version="Exchange2010" 
                         xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />
  </soap:Header>
  <soap:Body>
    <GetServerTimeZonesResponse xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
                                xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">
      <m:ResponseMessages>
        <m:GetServerTimeZonesResponseMessage ResponseClass="Success">
          <m:ResponseCode>NoError</ResponseCode>
          <m:TimeZoneDefinitions>
            <t:TimeZoneDefinition Id="Eastern Standard Time" Name="(GMT-05:00) Eastern Time (US &amp;amp; Canada)">
              <t:Periods>
                <t:Period Bias="PT5H" Name="Standard" Id="trule:Microsoft/Registry/EasternStandardTime/2006-Standard" />
                <t:Period Bias="PT4H" Name="Daylight" Id="trule:Microsoft/Registry/EasternStandardTime/2006-Daylight" />
                <t:Period Bias="PT5H" Name="Standard" Id="trule:Microsoft/Registry/EasternStandardTime/2007-Standard" />
                <t:Period Bias="PT4H" Name="Daylight" Id="trule:Microsoft/Registry/EasternStandardTime/2007-Daylight" />
              </t:Periods>
              <t:TransitionsGroups>
                <t:TransitionsGroup Id="0">
                  <t:RecurringDayTransition>
                    <t:To Kind="Period">trule:Microsoft/Registry/EasternStandardTime/2006-Daylight</t:To>
                    <t:TimeOffset>PT2H</t:TimeOffset>
                    <t:Month>4</t:Month>
                    <t:DayOfWeek>Sunday</t:DayOfWeek>
                    <t:Occurrence>1</t:Occurrence>
                  </t:RecurringDayTransition>
                  <t:RecurringDayTransition>
                    <t:To Kind="Period">trule:Microsoft/Registry/EasternStandardTime/2006-Standard</t:To>
                    <t:TimeOffset>PT2H</t:TimeOffset>
                    <t:Month>10</t:Month>
                    <t:DayOfWeek>Sunday</t:DayOfWeek>
                    <t:Occurrence>-1</t:Occurrence>
                  </t:RecurringDayTransition>
                </t:TransitionsGroup>
                <t:TransitionsGroup Id="1">
                  <t:RecurringDayTransition>
                    <t:To Kind="Period">trule:Microsoft/Registry/EasternStandardTime/2007-Daylight</t:To>
                    <t:TimeOffset>PT2H</t:TimeOffset>
                    <t:Month>3</t:Month>
                    <t:DayOfWeek>Sunday</t:DayOfWeek>
                    <t:Occurrence>2</t:Occurrence>
                  </t:RecurringDayTransition>
                  <t:RecurringDayTransition>
                    <t:To Kind="Period">trule:Microsoft/Registry/EasternStandardTime/2007-Standard</t:To>
                    <t:TimeOffset>PT2H</t:TimeOffset>
                    <t:Month>11</t:Month>
                    <t:DayOfWeek>Sunday</t:DayOfWeek>
                    <t:Occurrence>1</t:Occurrence>
                  </t:RecurringDayTransition>
                </t:TransitionsGroup>
              </t:TransitionsGroups>
              <t:Transitions>
                <t:Transition>
                  <t:To Kind="Group">0</t:To>
                </t:Transition>
                <t:AbsoluteDateTransition>
                  <t:To Kind="Group">1</t:To>
                  <t:DateTime>2007-01-01T00:00:00</t:DateTime>
                </t:AbsoluteDateTransition>
              </t:Transitions>
            </t:TimeZoneDefinition>
          </m:TimeZoneDefinitions>
        </m:GetServerTimeZonesResponseMessage>
      </m:ResponseMessages>
    </m:GetServerTimeZonesResponse>
  </soap:Body>
</soap:Envelope>

Voir aussiSee also

GetServerTimeZonesGetServerTimeZones

GetServerTimeZonesResponseGetServerTimeZonesResponse

GetServerTimeZonesTypeGetServerTimeZonesType

Opérations EWS dans ExchangeEWS operations in Exchange