Commit 13d7ff6f authored by Lasse Karstensen's avatar Lasse Karstensen

Add T to ISO8601 format.

Since we have been accepting ISO8601 without timezone up until now,
continue doing so until 4.0 EOL.

Based on 60c98eb0 by Federico G. Schwindt.
parent 1ac441bc
......@@ -28,6 +28,9 @@ client c1 {
txreq -hdr "X-Date: Mon Dec 20 00:00:00 2010"
rxresp
expect resp.http.x-past == 1
txreq -hdr "X-Date: 2030-12-20 00:00:00"
rxresp
expect resp.http.x-future == 1
txreq -hdr "X-Date: 2030-12-20T00:00:00"
rxresp
expect resp.http.x-future == 1
......
......@@ -115,7 +115,8 @@ static const char *fmts[] = {
"%a, %d %b %Y %T GMT", /* RFC 822 & RFC 1123 */
"%A, %d-%b-%y %T GMT", /* RFC 850 */
"%a %b %d %T %Y", /* ANSI-C asctime() */
"%F %T", /* ISO 8601 */
"%F %T", /* ISO 8601 (incorrect, only in 4.0) */
"%FT%T", /* ISO 8601 */
NULL
};
......
......@@ -222,7 +222,7 @@ vmod_time2real(const struct vrt_ctx *ctx, VCL_TIME t)
}
VCL_TIME __match_proto__(td_std_time)
vmod_time(VRT_CTX, VCL_STRING p, VCL_TIME d)
vmod_time(const struct vrt_ctx *ctx, VCL_STRING p, VCL_TIME d)
{
double r;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment