@@ -0,0 +1 @@ |
||
| 1 |
+ |
@@ -1,6 +1,7 @@ |
||
| 1 | 1 |
# -*- coding: utf-8 -*- |
| 2 | 2 |
|
| 3 | 3 |
|
| 4 |
+import os |
|
| 4 | 5 |
import time |
| 5 | 6 |
|
| 6 | 7 |
|
@@ -9,5 +10,7 @@ def local_string(): |
||
| 9 | 10 |
|
| 10 | 11 |
|
| 11 | 12 |
def set_time(timestr): |
| 12 |
- with open('/ramfs/current_time', 'w') as f:
|
|
| 13 |
- f.write('date -s "{}"'.format(timestr))
|
|
| 13 |
+ # with open('/ramfs/current_time', 'w') as f:
|
|
| 14 |
+ # f.write('date -s "{}"'.format(timestr))
|
|
| 15 |
+ dates = 'date -s "{}"'.format(timestr)
|
|
| 16 |
+ os.system("echo '{}' > /ramfs/current_time_tmp; mv /ramfs/current_time_tmp /ramfs/current_time".format(dates))
|