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
74123084
Commit
74123084
authored
Jan 25, 2018
by
Kim Jinsung
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'kddi/odakyuToiletSignage_1.0.0_leej' into 'master'
#28062 ログ修正 See merge request
!2
parents
31dd4c13
d4adcf41
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 @
74123084
...
@@ -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
);
}
}
}
}
...
...
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