We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f117b20 commit 9428b8cCopy full SHA for 9428b8c
Lib/_strptime.py
@@ -302,7 +302,7 @@ def __init__(self, locale_time=None):
302
# W is set below by using 'U'
303
'y': r"(?P<y>\d\d)",
304
'Y': r"(?P<Y>\d\d\d\d)",
305
- 'z': r"(?P<z>[+-]\d\d(:?[0-5]\d(:?[0-5]\d(\.\d{1,6})?)?)?|(?-i:Z))",
+ 'z': r"(?P<z>([+-]\d\d(:?[0-5]\d(:?[0-5]\d(\.\d{1,6})?)?)?)|(?-i:Z))?",
306
'A': self.__seqToRE(self.locale_time.f_weekday, 'A'),
307
'a': self.__seqToRE(self.locale_time.a_weekday, 'a'),
308
'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'),
0 commit comments