Domino Code Fragment
| Code Name* GMTTime property | Date* 11/02/2025 | Source (or email address if you prefer)* [email protected] IP address:.172.70.50.50 | |
| Description* This agent prints the creation date and time of the current database in GMT. | Type* Java | Categories* Date/Time Handling | |
| Implementation: | Required Client: | Server: |
| Limitations: | Comments: | |
public class gmttimeagent extends AgentBase
{
public void NotesMain()
{
try
{
Session s = getSession();
AgentContext ac = s.getAgentContext();
Database db = ac.getCurrentDatabase();
DateTime createdDateTime = db.getCreated();
String sCreatedDateTime = createdDateTime.getGMTTime();
System.out.println
("Database \"" + db.getTitle() +
"\" was created on " + sCreatedDateTime + ".");
}
catch (Exception e)
{
e.printStackTrace();
}
}
}