Examples: adjustHour method
This agent decrements the time by 10 hours.
import lotus.domino.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
DateTime dt = session.createDateTime("Today");
dt.setNow();
System.out.println("Now: " + dt.getLocalTime());
dt.adjustHour(-10, true);
System.out.println("Ten hours ago: " +
dt.getLocalTime());
} catch(Exception e) {
e.printStackTrace();
}
}
}