关于时间的显示
为什么下面的代码结果不一样?
<%
SimpleDateFormat fmtrq1 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss",Locale.US);
String sql;
sql="select sysdate from dual";
rs = stmt.executeQuery(sql);
rs.next();
java.util.Date dhsj=rs.getDate(1);
out.println(fmtrq1.format(dhsj));
out.println("<p>");
Date today = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
out.println(formatter.format(today));
%>
结果
2002-04-19 12:00:00
2002-04-19 11:14:17