convertToZone (DateTime - Java)

Changes the TimeZone and IsDST properties as specified.

Defined in

DateTime

Syntax

public void convertToZone(int zone, boolean isDST)
    throws NotesException

Parameters

int zone

A time zone -12 through 12.

boolean isDST

Indicates whether daylight-saving time is in effect (true) or not (false).

Usage

These changes also affect the ZoneTime property.

These changes do not affect the GMTTime and the LocalTime properties.

This method has no effect on an invalid TimeZone (because the DateTime object lacks the date or the time). TimeZone continues to return 0.

CAUTION: This method uses the daylight saving time rules of the zone being converted from, not the zone being converted to.

Daylight saving time is a world-wide practice of decreasing energy consumption by adjusting clocks forward an hour, changing the offset from GMT. The TimeZone property indicates the base offset from GMT. For example, standard time in New York City is GMT -5, but when daylight savings is in effect, New York City is GMT -4.

Example