TimeZone (NotesDateTime - JavaScript)

Read-only. An integer representing the time zone of a date-time.

Defined in

NotesDateTime

Syntax

getTimeZone() : int

Usage

This property is the number of hours that must be added to the time to get Greenwich Mean Time when daylight-saving time is not in effect. It may be positive or negative.

When you create a new NotesDateTime object, this property is set according to the time zone setting of the computer on which the program runs or, for remote (IIOP) operations, the Domino® server.

This property is not set and returns 0 if the NotesDateTime object does not include both a time and a date.

When you access a date-time value from an item in a document using the DateTimeValue property in NotesItem, this property is set according to the time zone stored in the item.

The convertToZone method and LocalTime property may modify the value of this property.

Examples

This computed field displays the creation date for the current database with information on the time zone and daylight savings.
var dt:NotesDateTime = database.getCreated();
return "This database was created on " + dt.getLocalTime() +
	" (time zone " + dt.getTimeZone().toFixed() +
	(dt.isDST() ? " with" : " without") + " daylight savings)";