Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
odakyuToiletSignage
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kddi
odakyuToiletSignage
Commits
d4adcf41
Commit
d4adcf41
authored
Jan 25, 2018
by
leej
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#28062 ログ修正
parent
35a6c1c4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
app/src/main/java/jp/odakyu/toiletsignage/task/UpdateToiletInfoTask.java
+4
-4
No files found.
app/src/main/java/jp/odakyu/toiletsignage/task/UpdateToiletInfoTask.java
View file @
d4adcf41
...
...
@@ -122,7 +122,6 @@ public class UpdateToiletInfoTask extends TimerTask {
*/
private
boolean
isAbnormalYear
()
{
int
currentYear
=
Integer
.
parseInt
(
DateTimeUtil
.
toStringInTimeZone
(
new
Date
(),
DateTimeFormat
.
yyyy
,
"UTC"
));
Logger
.
i
(
TAG
,
"Current year : "
+
currentYear
);
return
currentYear
<
TWO_THOUSAND_YEARS
;
}
...
...
@@ -135,10 +134,11 @@ public class UpdateToiletInfoTask extends TimerTask {
String
jsonString
=
NtpServerConnection
.
connectionNtpServer
();
JSONObject
jsonObject
=
new
JSONObject
(
jsonString
);
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
);
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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment