Skip to content

Commit ae9b0b8

Browse files
committed
Progress towards validation
1 parent 43a6efc commit ae9b0b8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/mock_vws/_mock_web_query_api.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,17 @@ def validate_date_format(
302302
# We expect that more formats than this will be accepted.
303303
# These are the accepted ones we know of at the time of writing.
304304
known_accepted_formats = {
305-
'%a, %d %b %Y %H:%M:%S GMT',
305+
'%a, %b %d %H:%M:%S %Y',
306+
'%a %b %d %H:%M:%S %Y',
307+
'%a, %d %b %Y %H:%M:%S',
308+
'%a %d %b %Y %H:%M:%S',
306309
}
307310

311+
formats_with_timezones = set(item + ' GMT' for item in known_accepted_formats)
312+
313+
formats = known_accepted_formats.union(formats_with_timezones)
314+
import pdb; pdb.set_trace()
315+
308316
try:
309317
datetime.datetime.strptime(
310318
request.headers['Date'],

0 commit comments

Comments
 (0)