Commit a9930bf3 by Filippo Valsorda

Make enforce_type an optional flag, to avoid conflicts

parent 5edfc479
......@@ -68,7 +68,10 @@ class Date(Field):
"""
if value is None:
return None
if isinstance(value, datetime.datetime):
if isinstance(value, time.struct_time):
# struct_times are always utc
return time.strftime('%Y-%m-%dT%H:%M:%SZ', value)
elif isinstance(value, datetime.datetime):
if value.tzinfo is None or value.utcoffset().total_seconds() == 0:
# isoformat adds +00:00 rather than Z
return value.strftime('%Y-%m-%dT%H:%M:%SZ')
......
......@@ -17,7 +17,7 @@
-e git+https://github.com/appliedsec/pygeoip.git@95e69341cebf5a6a9fbf7c4f5439d458898bdc3b#egg=pygeoip
# Our libraries:
-e git+https://github.com/FiloSottile/XBlock.git@a9158e9887217abe27e451d1ff82c0d9f98c0bd6#egg=XBlock # TODO: put here the edx/XBlock#200 merge commit
-e git+https://github.com/FiloSottile/XBlock.git@ee9aaa5e1cc267de62b0e9cb638461a55e630af9#egg=XBlock # TODO: put here the edx/XBlock#200 merge commit
-e git+https://github.com/edx/codejail.git@71f5c5616e2a73ae8cecd1ff2362774a773d3665#egg=codejail
-e git+https://github.com/edx/diff-cover.git@v0.5.0#egg=diff_cover
-e git+https://github.com/edx/js-test-tool.git@v0.1.5#egg=js_test_tool
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment