Chromium Code Reviews| Index: build/android/provision_devices.py |
| diff --git a/build/android/provision_devices.py b/build/android/provision_devices.py |
| index 3d5ad7423bf8fb7521b755ad4a5bb1564668d836..8890fc0df2ad77b2b2ac78c6d65fae2d6a903082 100755 |
| --- a/build/android/provision_devices.py |
| +++ b/build/android/provision_devices.py |
| @@ -369,16 +369,16 @@ def FinishProvisioning(device, options): |
| def _set_and_verify_date(): |
| if device.build_version_sdk >= version_codes.MARSHMALLOW: |
| date_format = '%m%d%H%M%Y.%S' |
| - set_date_command = ['date'] |
| + set_date_command = ['date', '-u'] |
|
ghost stip (do not use)
2016/05/13 20:32:48
do we need to mirror this logic in https://goto.go
|
| else: |
| date_format = '%Y%m%d.%H%M%S' |
| - set_date_command = ['date', '-s'] |
| + set_date_command = ['date', '-u', '-s'] |
| strgmtime = time.strftime(date_format, time.gmtime()) |
| set_date_command.append(strgmtime) |
| device.RunShellCommand(set_date_command, as_root=True, check_return=True) |
| device_time = device.RunShellCommand( |
| - ['date', '+"%Y%m%d.%H%M%S"'], as_root=True, |
| + ['date', '-u', '+"%Y%m%d.%H%M%S"'], as_root=True, |
| single_line=True).replace('"', '') |
| device_time = datetime.datetime.strptime(device_time, "%Y%m%d.%H%M%S") |
| correct_time = datetime.datetime.strptime(strgmtime, date_format) |