Here you can find the source of getThisSecondTime()
public static String getThisSecondTime()
//package com.java2s; /******************************************************************************* * @(#)DateUtil.java Oct 23, 2007/*from w ww.j a va 2 s. com*/ * * Copyright 2007 Neusoft Group Ltd. All rights reserved. * Neusoft PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. *******************************************************************************/ import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class Main { public static String getThisSecondTime() { Calendar calendar = Calendar.getInstance(); Date currentTime = calendar.getTime(); SimpleDateFormat formatter = new SimpleDateFormat("yyMMddHHmmss"); return formatter.format(currentTime); } }