質問編集履歴

2

ソース冒頭に ```python を付け加えました

2021/12/05 10:08

投稿

gobakuou
gobakuou

スコア1

test CHANGED
File without changes
test CHANGED
@@ -46,7 +46,7 @@
46
46
 
47
47
  ソース
48
48
 
49
- python
49
+ ```python
50
50
 
51
51
  def ft991_SET_GPS_TIME():
52
52
 
@@ -57,16 +57,6 @@
57
57
  msec10 = '10'
58
58
 
59
59
  tz_ = 9
60
-
61
- #J_gpstime = 'None'#文字
62
-
63
- #U_gpstime = 'None'#文字
64
-
65
- #J_gpsdate = 'None'#文字
66
-
67
- #U_gpsdate = 'None'#文字
68
-
69
- #GPS_STABLE = 'V'#文字
70
60
 
71
61
  hour = GPS.U_gpstime[0:2]
72
62
 
@@ -96,10 +86,6 @@
96
86
 
97
87
  gnsstime = dtrmc.strftime("%Y-%m-%d %H:%M:%S")
98
88
 
99
- #print('gnsstime', gnsstime)
100
-
101
- #gnsstime = '2021-12-04 23:05:40'dtrmc.strftime("%Y-%m-%d %H:%M:%S")
102
-
103
89
  if( GPS.GPS_STABLE == 'A' ):#安定受信
104
90
 
105
91
  if "Linux" in platform.system():
@@ -112,9 +98,11 @@
112
98
 
113
99
  subprocess.call(["/usr/bin/timedatectl", "set-time", gnsstime])
114
100
 
115
- #subprocess.call(["sudo /usr/bin/timedatectl", "set-time", gnsstime])
101
+ subprocess.call(["/usr/bin/timedatectl","set-ntp","yes"])
116
102
 
117
- subprocess.call(["/usr/bin/timedatectl","set-ntp","yes"])
103
+ ```
104
+
105
+
118
106
 
119
107
 
120
108
 

1

ご指摘のとおりpythonの行を追加しました

2021/12/05 10:08

投稿

gobakuou
gobakuou

スコア1

test CHANGED
File without changes
test CHANGED
@@ -45,6 +45,8 @@
45
45
 
46
46
 
47
47
  ソース
48
+
49
+ python
48
50
 
49
51
  def ft991_SET_GPS_TIME():
50
52