django-parse-http-date

About this case

Django's parse_http_date tests. The answers match on 10 of 12 lines; 2 differ for the reason given beside them.

Input
12 lines, 8 valid · 364 B · raw text
Output
111 B
Archive
000033_must_render_exactly/input

Input

Invisible characters are shown as symbols, such as ␀ for NUL and ␉ for tab.

# Line Expected Django’s tests says
1 Sun, 06 Nov 1994 08:49:37 GMT 784111777 784111777 (test_http.py:407)
2 Tuesday, 31-Dec-69 08:49:37 GMT 3155705377 3155705377 (test_http.py:423 (clock now_1))
3 Tuesday, 10-Nov-70 08:49:37 GMT 27074977 27074977 (test_http.py:428 (clock now_1))
4 Sunday, 06-Nov-94 08:49:37 GMT 784111777 784111777 (test_http.py:433 (clock now_1))
5 Wednesday, 31-Dec-70 08:49:37 GMT invalid 3187241377 (test_http.py:438 (clock now_2))

Django reads 70 as 2070 because its clock was set to 2020, as RFC 9110 suggests. This contract's fixed RFC 6265 pivot makes it 1970, which was a Thursday.

6 Friday, 31-Dec-71 08:49:37 GMT 63017377 63017377 (test_http.py:443 (clock now_2))
7 Sunday, 31-Dec-00 08:49:37 GMT 978252577 978252577 (test_http.py:448 (clock now_3))
8 Friday, 31-Dec-99 08:49:37 GMT 946630177 946630177 (test_http.py:453 (clock now_3))
9 Sun Nov 6 08:49:37 1994 784111777 784111777 (test_http.py:469)
10 Sun Nov 6 08:49:37 1994 invalid invalid (test_http.py:478)
11 Sun Nov 12 08:49:37 1994 invalid invalid (test_http.py:480)
12 Sun Nov 6 08:49:37 0037 invalid 2141110177 (test_http.py:483)

Django reads an asctime year below 70 as 20xx and never checks the weekday. Here 0037 is the year 37, and 0037-11-06 was not a Sunday.

Expected output

The output must match these bytes exactly.

784111777
3155705377
27074977
784111777
invalid
63017377
978252577
946630177
784111777
invalid
invalid
invalid