[shell-perf-web] Allow a trailing Z on the uploaded date
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shell-perf-web] Allow a trailing Z on the uploaded date
- Date: Wed, 26 May 2010 20:51:09 +0000 (UTC)
commit cb8b0638220afd8e0207fdf64b8b8927b1e8a98d
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Wed May 26 16:49:08 2010 -0400
Allow a trailing Z on the uploaded date
We expect the uploaded date to always be UTC; accept a trailing
Z to indicate that explicitly. (Adding support for other timezones
wouldn't be hard, but since gnome-shell won't write them into
reports, no point to write the code.)
shell/perf/util.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/shell/perf/util.py b/shell/perf/util.py
index 9f1499d..ab28df6 100644
--- a/shell/perf/util.py
+++ b/shell/perf/util.py
@@ -55,7 +55,7 @@ class _sha1_adapter:
def hmac_sha1(key, msg=None):
return hmac.new(key, msg, digestmod=_sha1_adapter)
-_ISO_DATE_RE = re.compile('^(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)(?:\.(\d+))?$')
+_ISO_DATE_RE = re.compile('^(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)(?:\.(\d+))?Z?$')
# Parse the subset of ISO 8601 date formats that datetime.isoformat() produces
def parse_isodate(s):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]