Skip to main content
Omnitracs Knowledge Base

Get TimeZones

getTimeZones

This web service returns an array of TimeZone objects.

TimeZone[] getTimeZones(string companyId, string locale) throws WSException

  • companyId: (optional) A string of maximum length 10 that specifies the unique company identifier. If a company is specified, the locale will be ignored and the valid timezones for the company will be returned. If no company or locale is specified, the company of the authorized user will be used.
  • locale: (optional) A string of maximum length 2 that specifies the locale to retrieve timezones for. This parameter will be ignored if a companyId is specified. Valid values for locale are:

     

    Value

     

     

    Description

     

    CA

    Canada

    CO

    Colombia

    MX

    Mexico

    PE

    Peru

    US

    United States

    VE

    Venezuela

Returns a null string on exceptions; otherwise returns an array of TimeZone objects.

 

Authorization Requirements

 

The credentials supplied with this method call (as specified in the accompanying WS-Security header) must be authorized to the following application(s) and their associated role-based permissions. 

Required Application Licenses
- Remote Integration

Required User Permissions
- None

Customer integrators are authorized to their own company's data only. 

 

Sample XML Request

 

Only the SOAP body is shown. To see a sample SOAP Envelope and Header, click here.

<soap:Body>

   <getTimeZones>

      <companyId></companyId>

      <locale>US</locale>

   </getTimeZones>

</soap:Body>

 

Sample XML Response

 

<soap:Body>

   <p431:getTimeZonesResponse xmlns:p431="http://websvcs.omaswebws">

      <getTimeZonesReturn>

         <TimeZone>

            <dstLongName>Atlantic Daylight Saving Time</dstLongName>

            <dstShortName>ADT</dstShortName>

            <gmtOffset>GMT-04:00</gmtOffset>

            <name>Atlantic Time</name>

            <stdLongName>Atlantic Standard Time</stdLongName>

            <stdShortName>AST</stdShortName>

         </TimeZone>

         <TimeZone>

            <dstLongName>Greenwich Daylight Saving Time</dstLongName>

            <dstShortName>GDT</dstShortName>

            <gmtOffset>GMT-00:00</gmtOffset>

            <name>Greenwich Mean Time</name>

            <stdLongName>Greenwich Mean Time</stdLongName>

            <stdShortName>GMT</stdShortName>

         </TimeZone>

         <TimeZone>

            <dstLongName>Eastern Daylight Saving Time</dstLongName>

            <dstShortName>EDT</dstShortName>

            <gmtOffset>GMT-05:00</gmtOffset>

            <name>Eastern Time</name>

            <stdLongName>Eastern Standard Time</stdLongName>

            <stdShortName>EST</stdShortName>

         </TimeZone>

         <TimeZone>

            <dstLongName>Central Daylight Saving Time</dstLongName>

            <dstShortName>CDT</dstShortName>

            <gmtOffset>GMT-06:00</gmtOffset>

            <name>Central Time</name>

            <stdLongName>Central Standard Time</stdLongName>

            <stdShortName>CST</stdShortName>

         </TimeZone>

         <TimeZone>

            <dstLongName>Mountain Daylight Saving Time</dstLongName>

            <dstShortName>MDT</dstShortName>

            <gmtOffset>GMT-07:00</gmtOffset>

            <name>Mountain Time</name>

            <stdLongName>Mountain Standard Time</stdLongName>

            <stdShortName>MST</stdShortName>

         </TimeZone>

         <TimeZone>

            <dstLongName>Pacific Daylight Saving Time</dstLongName>

            <dstShortName>PDT</dstShortName>

            <gmtOffset>GMT-08:00</gmtOffset>

            <name>Pacific Time</name>

            <stdLongName>Pacific Standard Time</stdLongName>

            <stdShortName>PST</stdShortName>

         </TimeZone>

         <TimeZone>

            <dstLongName>Alaska Daylight Saving Time</dstLongName>

            <dstShortName>AKDT</dstShortName>

            <gmtOffset>GMT-09:00</gmtOffset>

            <name>Alaska Time</name>

            <stdLongName>Alaska Standard Time</stdLongName>

            <stdShortName>AKST</stdShortName>

         </TimeZone>

         <TimeZone>

            <dstLongName>Hawaii-Aleutian Daylight Savin</dstLongName>

            <dstShortName>HADT</dstShortName>

            <gmtOffset>GMT-10:00</gmtOffset>

            <name>Hawaii-Aleutian Time</name>

            <stdLongName>Hawaii-Aleutian Standard Time</stdLongName>

            <stdShortName>HAST</stdShortName>

         </TimeZone>

      </getTimeZonesReturn>

   </p431:getTimeZonesResponse>

</soap:Body>

 

Exceptions

 

001 Unknown Error.
003 Company not authorized for integration.
004 User not authorized.
005 Company ID is invalid.
006 Locale is invalid.

  • Was this article helpful?