Domino Code Fragment

Code Name*
LocalTime property
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.216.209.112
Description*
2. This agent sets the local date and time, then prints the date and time in local time and GMT.
Type*
Java
Categories*
Date/Time Handling
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
import lotus.notes.*;


public class localtimesetagent extends AgentBase
{
 public void NotesMain()
 {
   try
   {
     Session s = getSession();
     DateTime dt = s.createDateTime("");
     dt.setLocalTime("12/12/97 04:30:00 PM");
     System.out.println(dt.getLocalTime());
     System.out.println(dt.getGMTTime());
   }
   catch (Exception e)
   {
     e.printStackTrace();
   }
 }
}