Fix git cl upload on Windows
Use ISO8601 time format standard to avoid localized result and need to
encode.
R=ehmaldonado@chromium.org
Bug: 1074002
Change-Id: I95c2ddd55a9661351f2b45601f7bba24c2951c31
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2163401
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
diff --git a/git_cl.py b/git_cl.py
index 6c0c280..fc2ecad 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2029,10 +2029,7 @@
git_info_dir = tempfile.mkdtemp()
git_info_zip = trace_name + '-git-info'
- git_push_metadata['now'] = datetime_now().strftime('%c')
- if sys.stdin.encoding and sys.stdin.encoding != 'utf-8':
- git_push_metadata['now'] = git_push_metadata['now'].decode(
- sys.stdin.encoding)
+ git_push_metadata['now'] = datetime_now().strftime('%Y-%m-%dT%H:%M:%S.%f')
git_push_metadata['trace_name'] = trace_name
gclient_utils.FileWrite(