-1
이봐, 난해야 문제가 부정적인 :시간 긴
로그 :
04-26 11:29:09.332 21657-21784/com.grou D/answer: -3600000
04-26 11:29:09.332 21657-21784/com.grou D/answer: 12:00:00
코드 :
SimpleDateFormat dateFormat = new SimpleDateFormat("hh:mm:ss");
Date parsedDate = dateFormat.parse(TimeEnd);
Timestamp timestamp = new java.sql.Timestamp(parsedDate.getTime());
tsTimeEnd = timestamp.getTime();
Log.d("answer",Long.toString(timestamp.getTime()));
timestamp.setTime(tsTimeEnd);
Log.d("answer",dateFormat.format(timestamp));
이유 -3600000? :(
솔루션 : 내가 24 시간 전 HH를 넣어 정도 12시 0분 0초가
두 날짜로 b/n 할 정확히 무엇입니까? – Rajasekhar
http://stackoverflow.com/questions/15003498/why-does-simpledateformat-parse-gettime-return-an-incorrect - 음수 값 –
작동하지 않는 동일한 문제 시간 : -1.0 – Royalxm