Here you can find the source of getSysDateTimeMillis()
public static String getSysDateTimeMillis()
//package com.java2s; //License from project: Apache License import java.sql.Timestamp; public class Main { public static String getSysDateTimeMillis() { String str = new Timestamp(System.currentTimeMillis()).toString(); if (str.length() >= 23) { return str.substring(0, 23); } else {/*from w w w .j a v a2 s . co m*/ StringBuilder sb = new StringBuilder(); sb.append(str); for (int i = 0; i < 23 - str.length(); i++) { sb.append("0"); } return sb.toString(); } } }