Chromium Code Reviews| Index: build/android/provision_devices.py |
| diff --git a/build/android/provision_devices.py b/build/android/provision_devices.py |
| index 468ef3f324261359e7fe266cf1bac32c49fb6977..a2367a64bd66efaf5a984d39287f000a88daa9ac 100755 |
| --- a/build/android/provision_devices.py |
| +++ b/build/android/provision_devices.py |
| @@ -190,7 +190,11 @@ def ProvisionDevice(device, options, is_perf): |
| battery_info.get('level', 0)) |
| time.sleep(60) |
| battery_info = device.old_interface.GetBatteryInfo() |
| - device.RunShellCommand('date -u %f' % time.time(), as_root=True) |
| + # Need to set env var 'TZ' to 'UTC' so that devices set to UTC time. |
| + os.environ['TZ'] = 'UTC' |
| + time.tzset() |
| + device.RunShellCommand('date -s %s' % time.strftime('%Y%m%d.%I%M%S'), |
|
jbudorick
2014/10/22 15:52:11
Can you just do time.strftime(..., time.gmtime())
navabi
2014/10/22 16:17:35
Done.
|
| + as_root=True) |
| # TODO(jbudorick): Tune the timeout per OS version. |
| device.Reboot(True, timeout=600, retries=0) |
| props = device.RunShellCommand('getprop') |