File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
12
12
### Removed
13
13
### Fixed
14
14
* Fix bug that caused User-Agent header to be omitted from HTTP requests.
15
- * Fix glossary name prefix used in unit-tests to match git repository name.
15
+ * Fix glossary name prefix used in unit-tests to match git repository name.
16
+ * Add workaround for possible issue in datetime.strptime in Python 3.6.
16
17
### Security
17
18
18
19
Original file line number Diff line number Diff line change @@ -152,10 +152,12 @@ def __str__(self) -> str:
152
152
@staticmethod
153
153
def from_json (json ) -> "GlossaryInfo" :
154
154
"""Create GlossaryInfo from the given API JSON object."""
155
- # Workaround for bug in Python 3.6
155
+ # Workaround for bugs in strptime() in Python 3.6
156
156
creation_time = json ["creation_time" ]
157
157
if ":" == creation_time [- 3 :- 2 ]:
158
158
creation_time = creation_time [:- 3 ] + creation_time [- 2 :]
159
+ if "Z" == creation_time [- 1 :]:
160
+ creation_time = creation_time [:- 1 ] + "+0000"
159
161
160
162
return GlossaryInfo (
161
163
json ["glossary_id" ],
You can’t perform that action at this time.
0 commit comments