- gc.set(year, month - 1, day);
- return new java.sql.Date(gc.getTime().getTime());
+ gc.set(year, month - 1, day, 0, 0, 0);
+ gc.set(Calendar.MILLISECOND, 0);
+ return new DayDate(gc.getTime().getTime());
+ }
+
+ public static SimpleDateFormat getDateFormat() {
+ SimpleDateFormat local = fmt.get();
+ if (local == null) {
+ local = new SimpleDateFormat("yyyy-MM-dd");
+ local.setLenient(false);
+ local.setTimeZone(TimeZone.getTimeZone("UTC"));
+ fmt.set(local);
+ }
+ return local;