parent
4ab0b123e8
commit
e7abfe6c72
@ -1,17 +0,0 @@
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
public class Timemanage {
|
||||
public static void main(String[] args) {
|
||||
Timemanage t1 = new Timemanage();
|
||||
t1.timeget();
|
||||
System.out.println(t1.timeget());
|
||||
}
|
||||
|
||||
public String timeget() {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy年-MM月-dd日-HH时-mm分-ss秒");
|
||||
//System.out.println("中文格式: " + now.format(formatter));
|
||||
return now.format(formatter);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue