Java tutorial
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static String getInstantTimestamp() { DateFormat formatter = new SimpleDateFormat("HH:mm:ss"); String dateFormatted = formatter.format(new Date()); return "[" + dateFormatted + "]" + " "; } }