package com.f_young.controller;
import java.text.SimpleDateFormat;
import java.util.Date;
public class TestTime
{
public static void main(String[] args)
{
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String ss= df.format(new Date());
System.out.println(ss);
System.out.println(df.format(new Date()));// new Date()为获取当前系统时间
}
}