Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Unified Diff: build/android/pylib/utils/time_helper.py

Issue 2933993002: Add local results details pages.
Patch Set: Add --local-output arg which enables local results detail pages. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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())

Powered by Google App Engine
This is Rietveld 408576698