Here you can find the source of getYYYYMMDDHHMMSS()
public static final DateFormat getYYYYMMDDHHMMSS()
//package com.java2s; /******************************************************************************* * I N T E L C O R P O R A T I O N * /* w w w . jav a 2 s . com*/ * Functional Group: Fabric Viewer Application * * File Name: Util.java * * Archive Source: $Source$ * * Archive Log: $Log$ * Archive Log: Revision 1.18 2015/08/18 14:28:35 jijunwan * Archive Log: PR 130033 - Fix critical issues found by Klocwork or FindBugs * Archive Log: - DateFormat is not thread safe. Changed to create new DateFormat to avoid sharing it among different threads * Archive Log: * Archive Log: Revision 1.17 2015/08/17 18:54:12 jijunwan * Archive Log: PR 129983 - Need to change file header's copyright text to BSD license txt * Archive Log: - changed frontend files' headers * Archive Log: * Archive Log: Revision 1.16 2015/07/28 18:29:10 fisherma * Archive Log: PR 129219 - Admin page login dialog improvement * Archive Log: * Archive Log: Revision 1.15 2015/07/14 17:00:59 jijunwan * Archive Log: PR 129541 - Should forbid save or deploy when there is invalid edit on management panel * Archive Log: - removed unnecessary argument for warning message display * Archive Log: * Archive Log: Revision 1.14 2015/06/10 19:58:58 jijunwan * Archive Log: PR 129120 - Some old files have no proper file header. They cannot record change logs. * Archive Log: - wrote a tool to check and insert file header * Archive Log: - applied on backend files * Archive Log: * * Overview: * * @author: jijunwan * ******************************************************************************/ import java.text.DateFormat; import java.text.SimpleDateFormat; public class Main { public static final DateFormat getYYYYMMDDHHMMSS() { return new SimpleDateFormat("yyyy-MM-dd hh:mm:ss a, z"); } }