convertToZone (NotesDateTime - JavaScript)

Changes the TimeZone and IsDST properties as specified.

Defined in

NotesDateTime

Syntax

convertToZone(zone:int, isDST:boolean) : void
Parameter Description
zone A time zone -12 through 12.
isDST Indicates whether daylight savings is in effect (true) or not (false).

Usage

These changes 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 NotesDateTime object lacks the date or the time). TimeZone continues to return 0.

Examples

This button converts the current time to all time zones.
var dt:NotesDateTime = session.createDateTime("Today 06:00");
dt.setNow();
requestScope.status = "Zone\tTime";
for (var i = -12; i <= 12; i++) {
	dt.convertToZone(i, dt.isDST());
	requestScope.status += "\n" +
	dt.getTimeZone() + "\t\t" + dt.getZoneTime();
}