Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.compoze.exchange
Class ExchangeTimeZone

    java.lang.Object
      com.compoze.exchange.ExchangeTimeZone

All Implemented Interfaces:
  java.io.Serializable

public class ExchangeTimeZone
extends java.lang.Object
implements java.io.Serializable

This class represents a time zone as stored in Exchange. It provides a two-way mapping between a Java time zone and Exchange time zone and can be passed to the `SessionInfo` class to set the time zone persistently. When the time zone for the session is changed, all dates retrieved are adjusted accordingly. This means that when using the API the returned `java.util.Date` objects may not have their millisecond value set to UTC, but to the local time of the user. This has the effect that it is not necessary to use a `DateFormat` instance with time zone set on it to display dates and times. The calculation of time zone offsets is instead left to the service to avoid discrepancies in time zone calculation between Java and Exchange.
There are some effects to be aware of regarding time zone support that may at first be confusing. These can be most easily understood by working with the web example that ships with the Compoze Exchange Connector, as that provides a way to get and set the time zone in the Options screen and experiment with the effects of changing it.

- If you change the time zone after creating an appointment, the reported times for the appointment will shift, which may mean that all day events appear on two days at the same time.
- If you change the time zone after setting a birthday or anniversary for a contact, the date may appear on the day before because the times have shifted.
- If you change the time zone after setting a due date for a task, the date may appear on the day before.

See Also:
  Serialized Form

Method Summary
`boolean` | `equals(java.lang.Object o)` Equals.
`static ExchangeTimeZone` | `get(int iNumber)` Gets an Exchange time zone by its number.
`static ExchangeTimeZone` | `get(java.util.TimeZone tz)` Gets an Exchange time zone from a Java time zone.
`static ExchangeTimeZone[]` | `getAllTimeZones()` Gets all of the time zones available.
`java.util.Calendar` | `getCalendarInstance()` Gets an instance of a Java calendar that is in this time zone.
`java.lang.String` | `getName()` Gets the displayable name representing the time zone.
`int` | `getNumber()` Gets the time zone number.
`int` | `getOffset()` Gets the time zone offset from UTC standard in milliseconds.
`java.util.TimeZone` | `getTimeZone()` Gets a Java time zone for the Exchange time zone.
`static void` | `main(java.lang.String[] args)` Main.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getNumber

    public int getNumber()

  Gets the time zone number.

  Returns:
    the time zone number

### getAllTimeZones

    public static ExchangeTimeZone[] getAllTimeZones()

  Gets all of the time zones available.

  Returns:
    an array of all of the available time zones

### getCalendarInstance

    public java.util.Calendar getCalendarInstance()

  Gets an instance of a Java calendar that is in this time zone.

### get

    public static ExchangeTimeZone get(java.util.TimeZone tz)

  Gets an Exchange time zone from a Java time zone.

  Parameters:
    `tz` - the Java time zone to get the Exchange time zone for
  Returns:
    the Exchange time zone

### get

    public static ExchangeTimeZone get(int iNumber)

  Gets an Exchange time zone by its number.

### getTimeZone

    public java.util.TimeZone getTimeZone()

  Gets a Java time zone for the Exchange time zone.

### getName

    public java.lang.String getName()

  Gets the displayable name representing the time zone.

  Returns:
    the time zone name

### getOffset

    public int getOffset()

  Gets the time zone offset from UTC standard in milliseconds.

  Returns:
    the time zone offset

### equals

    public boolean equals(java.lang.Object o)

  Equals.

### main

    public static void main(java.lang.String[] args)

  Main.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.