now properly handles seconds and or Z

This commit is contained in:
dfeinzeig
2015-03-19 21:30:08 -04:00
parent 2252452453
commit 7f5acb6078

View File

@@ -16,7 +16,7 @@ from datetime import datetime
TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ" TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
TIME_FORMAT_WITH_FRAGMENT = re.compile( TIME_FORMAT_WITH_FRAGMENT = re.compile(
"^(\d{4,4}-\d{2,2}-\d{2,2}T\d{2,2}:\d{2,2}:\d{2,2})(\.\d)*Z?$") "^(\d{4,4}-\d{2,2}-\d{2,2}T\d{2,2}:\d{2,2}:\d{2,2})(\.\d*)?Z?$")
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# I'm sure this is implemented somewhere else can't find it now though, so I # I'm sure this is implemented somewhere else can't find it now though, so I