Java Time Now getNowTime()

Here you can find the source of getNowTime()

Description

yyyy-MM-dd HH:mm:ss

License

Apache License

Declaration

public static String getNowTime() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.SimpleDateFormat;

import java.util.Date;

import java.util.Locale;

public class Main {
    /**/*from www. jav  a  2  s.com*/
     * yyyy-MM-dd HH:mm:ss Comment for <code>allDateFmt</code>
     */
    public static final SimpleDateFormat allDateFmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.CHINA);

    /**
     * yyyy-MM-dd HH:mm:ss
     * 
     * @return
     */
    public static String getNowTime() {
        return allDateFmt.format(new Date());
    }
}

Related

  1. getNowTime()
  2. getNowTime()
  3. getNowTime()
  4. getNowTime()
  5. getNowTime()
  6. getNowTime(String format)
  7. getNowTime(String format, Locale loc)
  8. getNowTime(String formatStr)
  9. getNowWithLocal(boolean ifdatetime)