Operação GetServerTimeZonesGetServerTimeZones operation

A operação GetServerTimeZones retorna informações de definições de fuso horário que estão disponíveis em um servidor Exchange.The GetServerTimeZones operation returns information from time zone definitions that are available on an Exchange server.

Cabeçalhos SOAPSOAP Headers

A operação GetServerTimeZones pode usar os cabeçalhos SOAP listados e descritos na tabela a seguir.The GetServerTimeZones operation can use the SOAP headers that are listed and described in the following table.

HeaderHeader ElementoElement DescriçãoDescription
MailboxCultureMailboxCulture
MailboxCultureMailboxCulture
Identifica a cultura RFC3066 a ser usada para acessar a caixa de correio.Identifies the RFC3066 culture to be used to access the mailbox.
RequestVersionRequestVersion
RequestServerVersionRequestServerVersion
Identifica a versão do esquema para a solicitação de operação.Identifies the schema version for the operation request.
ServerVersionServerVersion
ServerVersionInfoServerVersionInfo
Identifica a versão do servidor que respondeu à solicitação.Identifies the version of the server that responded to the request.

Exemplos de solicitação GetServerTimeZonesGetServerTimeZones request examples

Obtendo o nome e o identificador de cada fuso horárioGetting the Name and Identifier of Each Time Zone

O exemplo de código a seguir mostra como recuperar o nome e o identificador para o horário padrão da costa leste e fuso horário padrão do Pacífico.The following code example shows how to retrieve the name and identifier for the Eastern Standard Time and Pacific Standard Time time zones.

CódigoCode

<?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>

ComentáriosComments

Cada elemento ID (TimeZone) contém o identificador de uma definição de fuso horário que está sendo solicitada.Each Id (TimeZone) element contains the identifier of a time zone definition that is being requested. Para solicitar informações de todos os fusos horários, omita o elemento IDs da solicitação.To request information for all time zones, omit the Ids element from the request.

Obtendo a definição completa de cada fuso horárioGetting the Full Definition of Each Time Zone

O exemplo de código a seguir mostra como recuperar a definição de fuso horário completo do fuso horário padrão do leste.The following code example shows how to retrieve the full time zone definition for the Eastern Standard Time time zone.

CódigoCode

<?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>

ComentáriosComments

Cada elemento ID (TimeZone) contém o identificador de uma definição de fuso horário que está sendo solicitada.Each Id (TimeZone) element contains the identifier of a time zone definition that is being requested. Para solicitar informações de todos os fusos horários, omita o elemento IDs da solicitação.To request information for all time zones, omit the Ids element from the request.

Exemplos de resposta GetServerTimeZonesGetServerTimeZones response examples

Recebendo somente o nome e o identificador de fuso horárioReceiving the Time Zone Name and Identifier Only

O exemplo a seguir de uma resposta GetServerTimeZones mostra uma resposta bem-sucedida a uma solicitação GetServerTimeZones na qual o atributo ReturnFullTimeZoneData foi definido como 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. A resposta contém o nome e o identificador para o horário padrão da costa leste e fuso horário padrão do Pacífico.The response contains the name and identifier for the Eastern Standard Time and Pacific Standard Time time zones.

CódigoCode

<?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>

Recebendo uma definição de fuso horário completoReceiving a Full Time Zone Definition

O exemplo a seguir de uma resposta GetServerTimeZones mostra uma resposta bem-sucedida a uma solicitação GetServerTimeZones na qual o atributo ReturnFullTimeZoneData foi definido como 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. A resposta contém a definição de fuso horário completo do fuso horário padrão do leste da costa.The response contains the full time zone definition for the Eastern Standard Time time zone.

CódigoCode

<?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>

Confira tambémSee also

GetServerTimeZonesGetServerTimeZones

GetServerTimeZonesResponseGetServerTimeZonesResponse

GetServerTimeZonesTypeGetServerTimeZonesType

Operações do EWS no ExchangeEWS operations in Exchange