You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
355 B
15 lines
355 B
package com.example.demo.productService.tools;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.Date;
|
|
|
|
|
|
public class nowTime{
|
|
public String nowTime(){
|
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
|
|
String time=(String)df.format(new Date());
|
|
return time;
|
|
}
|
|
}
|