Chromium Code Reviews| Index: build/android/pylib/utils/time_helper.py |
| diff --git a/build/android/pylib/utils/time_helper.py b/build/android/pylib/utils/time_helper.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4173c7d11b6f27e1bf8930f448d5c774fa0b5974 |
| --- /dev/null |
| +++ b/build/android/pylib/utils/time_helper.py |
| @@ -0,0 +1,15 @@ |
| +# Copyright 2017 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +import time |
| + |
| +def timestamp(local=False): |
|
jbudorick
2017/06/20 14:12:55
As mentioned in the other file, remove this & do i
|
| + """Returns a consistently formatted timestamp. |
| + |
| + Args |
| + local: Returns local time instead of UTC |
| + """ |
| + return time.strftime( |
| + '%Y-%m-%dT%H:%M:%SZ', |
|
jbudorick
2017/06/20 14:12:55
This is wrong if local=True -- the trailing Z indi
|
| + time.localtime() if local else time.gmtime()) |