java.sql.日期到joda时间转换
oracle sql:
select trunc( sysdate, 'Month') month
from dual
爪哇岛:
java.sql.Date sqlDate = resultSet.getDate("month");
log.info(sqlDate);
DateTime dateTime = new DateTime(sqlDate.getTime());
log.info(dateTime);
dateTime = dateTime.withMillisOfDay(0);
log.info(dateTime);
输出:
2012-01-01
2012-01-01T 01:00:00.000+07:00
2012-01-01T 00:00:00.000+07:00
额外的一小时在哪里?