File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/main/java/com/example/postgresdemo Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 11package com .example .postgresdemo ;
22
3- import org .apache .tomcat .jni .Time ;
3+
4+ import java .text .SimpleDateFormat ;
5+ import java .util .Date ;
6+
47import org .springframework .boot .SpringApplication ;
58import org .springframework .boot .autoconfigure .SpringBootApplication ;
69import org .springframework .data .jpa .repository .config .EnableJpaAuditing ;
912@ EnableJpaAuditing
1013public class PostgresDemoApplication {
1114 public static void main (String [] args ) {
12- System .out .println ("START:" + Time .now ());
15+ Date date1 = new Date ();
16+ SimpleDateFormat formatter =new SimpleDateFormat ("yy-mm-dd HH:mm:ss" );
17+ System .out .println ("Start:" + formatter .format (date1 ));
1318 SpringApplication .run (PostgresDemoApplication .class , args );
14- System . out . println ( "End:" + Time . now () );
15- System .out .println ("new change:" + Time . now ( ));
19+ Date date2 = new Date ( );
20+ System .out .println ("End:" + formatter . format ( date2 ));
1621 }
1722}
You can’t perform that action at this time.
0 commit comments