Domino Code Fragment
Code Name* AdjustSecond method | Date* 04/29/2024 | Source (or email address if you prefer)* Rlatulippe@romac.com IP address:.3.129.70.157 | |
Description* This agent decrements the time by 10 seconds. | Type* Java | Categories* Date/Time Handling |
Implementation: | Required Client: | Server: |
Limitations: | Comments: |
public class adjustsecondagent extends AgentBase
{
public void NotesMain()
{
try
{
Session s = getSession();
DateTime dt = s.createDateTime("");
dt.setNow();
System.out.println("Now: " + dt.getLocalTime());
dt.adjustSecond(-10, true);
System.out.println("Ten seconds ago: " + dt.getLocalTime());
}
catch (Exception e)
{
e.printStackTrace();
}
}
}