Commit d4adcf41 by leej

#28062 ログ修正

parent 35a6c1c4
...@@ -122,7 +122,6 @@ public class UpdateToiletInfoTask extends TimerTask { ...@@ -122,7 +122,6 @@ public class UpdateToiletInfoTask extends TimerTask {
*/ */
private boolean isAbnormalYear() { private boolean isAbnormalYear() {
int currentYear = Integer.parseInt(DateTimeUtil.toStringInTimeZone(new Date(), DateTimeFormat.yyyy, "UTC")); int currentYear = Integer.parseInt(DateTimeUtil.toStringInTimeZone(new Date(), DateTimeFormat.yyyy, "UTC"));
Logger.i(TAG,"Current year : " + currentYear);
return currentYear < TWO_THOUSAND_YEARS; return currentYear < TWO_THOUSAND_YEARS;
} }
...@@ -135,10 +134,11 @@ public class UpdateToiletInfoTask extends TimerTask { ...@@ -135,10 +134,11 @@ public class UpdateToiletInfoTask extends TimerTask {
String jsonString = NtpServerConnection.connectionNtpServer(); String jsonString = NtpServerConnection.connectionNtpServer();
JSONObject jsonObject = new JSONObject(jsonString); JSONObject jsonObject = new JSONObject(jsonString);
Long ntpTimeMillis = (long) ((Double) jsonObject.get("st") * 1000); Long ntpTimeMillis = (long) ((Double) jsonObject.get("st") * 1000);
Logger.d(TAG, "NTP Server ntpTimeMillis : " + ntpTimeMillis);
//ntpサーバから取得時間の結果が秒(xxxxxxxxxx.xxx)なのでミリ秒に変換のため、小数点を削除
String cmd = "date " + DateTimeUtil.toString(new Timestamp(ntpTimeMillis), DateTimeFormat.MMDDHHmmyyyyss__colon); String cmd = "date " + DateTimeUtil.toString(new Timestamp(ntpTimeMillis), DateTimeFormat.MMDDHHmmyyyyss__colon);
Logger.d(TAG, "Command : " + cmd);
Logger.d(TAG,"Current Date : " + DateTimeUtil.toString(DateTimeUtil.getCurrentDate(), DateTimeFormat.yyyyMMddHHmmss_slash));
Logger.d(TAG, "Command=%s, NtpDate=%s", cmd, DateTimeUtil.toString(new Timestamp(ntpTimeMillis), DateTimeFormat.yyyyMMddHHmmss_slash));
runAsRoot(cmd); runAsRoot(cmd);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment