Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static String getNowTime() { Calendar nowTime = Calendar.getInstance(); nowTime.add(Calendar.HOUR_OF_DAY, 8); return new SimpleDateFormat("yyyyMMddHHmmssSSS").format(nowTime.getTime()); } }