読み書き可能。ローカルタイムゾーンの日付/時刻を表すストリング。
setLocalTime(dt:string) : void
setLocalTime(hour:int, minute:int, second:int, hundredth:int) : void
setLocalTime(dt:Date) : void
setLocalDate(year:int, month:int, day:int) : void
setLocalDate(year:int, month:int, day:int, preserveLocalTime:boolean) : void
このプロパティを設定すると、オブジェクトが表す日付/時刻の値が変更されるため、GMTTime プロパティに影響します。
dt、year、month、day、hour、minute、second、hundredth パラメータによって、新しい時刻が指定されます。preserveLocalTime パラメータは、サマータイムの地域の境界を超える既存の日付からの調整に影響します。24 時間調整をした場合に次の日の同じ現地時間になるように、GMT 時刻を 1 時間増減させる場合は、true を指定します。パラメータが false または省略されている場合、GMT 時間は調整されたままとなり、現地時間は 1 時間増減されます。
Date オブジェクトを使用してこのプロパティを設定すると、タイムゾーンも変わる場合があります。
var dt:NotesDateTime = database.getCreated();
return "This database was created on " + dt.getLocalTime();
// Create valid NotesDateTime object
var dt:NotesDateTime = session.createDateTime("Today 12");
// requestScope variables are bound to numeric input boxes
// must convert numeric user input to int
var year = parseInt(requestScope.year, 10);
var month = parseInt(requestScope.month, 10);
var day = parseInt(requestScope.day, 10);
var hour = parseInt(requestScope.hour, 10);
var minute = parseInt(requestScope.minute, 10);
var second = parseInt(requestScope.second, 10);
var hundredth = parseInt(requestScope.hundredth, 10);
// Set date and time from user input
try {
dt.setLocalDate(year, month, day, true);
} catch(e) {
requestScope.date = "Illegal specification for date";
return;
}
try {
dt.setLocalTime(hour, minute, second, hundredth);
} catch(e) {
requestScope.date = "Illegal specification for time";
return;
}
// Post local time to input box
requestScope.date = dt.getLocalTime();
// Create valid NotesDateTime object
var dt:NotesDateTime = session.createDateTime("Today 12");
// Get date from user and set
dt.setLocalTime(requestScope.dt);
// Display date-time
requestScope.date = dt.getLocalTime();
// Create valid NotesDateTime object
var dt:NotesDateTime = session.createDateTime("Today 12");
// Create Date object (note: January = 0 for Date)
// requestScope variables are bound to numeric input boxes
var date:Date = new Date(requestScope.year, (requestScope.month) - 1, requestScope.day,
requestScope.hour, requestScope.minute, requestScope.second, requestScope.hundredth);
// Set time
dt.setLocalTime(date);
// Post local time
requestScope.date = dt.getLocalTime();