Examples: UntilTime property (DocumentCollection - Java)

This agent gets the UntilTime property by calling getModifiedDocuments and compares it to the system time (which may be the same but may differ).

import lotus.domino.*;

public class JavaAgent extends AgentBase {

  public void NotesMain() {

    try {
      Session session = getSession();
      AgentContext agentContext = session.getAgentContext();

      // (Your code goes here) 
      Database db = agentContext.getCurrentDatabase();
      DateTime systemTime = session.createDateTime("Today");
      
      // Get all modified documents and system time
      DocumentCollection dc = db.getModifiedDocuments();
      systemTime.setNow();
      
      // Display times
      System.out.println(systemTime.getLocalTime() + " system time");
      System.out.println(dc.getUntilTime().getLocalTime() + " UntilTime");

    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}