[PATCH 2/2] Add std.rfc1123() to convert a formatted datetime to VCL_TIME

Federico Schwindt fgsch at lodoss.net
Mon Dec 15 10:50:15 CET 2014


I thought about this and decided to go for rfc1123() as time() would
indicate a TIME input with .integer(), .ip() and .real().

While I agree that rfc1123() is a bit obscure it hints that the input
requires some standard format. Actually I should also document the
different formats supported.

The other options I had in mind were datetime() and date() but I liked
rfc1123() best.

On Mon, Dec 15, 2014 at 6:51 AM, Poul-Henning Kamp <phk at phk.freebsd.dk>
wrote:
>
> --------
> In message <CAJV_h0ajfdNnXX0SF77dJQ2MEK2kqiYM=
> yomOB-VY6F0CFkxXA at mail.gmail.com>, Fede
> rico Schwindt writes:
>
> >Depends on previous email "[PATCH 1/2] Permit to compare 2 times using
> >standard operators".
> >
> >Useful to check if e.g. Last-Modified is older than a given time.
>
> Shouldn't this be named vmod.time() to match the other conversion
> functions ?
>
> rfc1123 certainly seems to be a far too obscure name for the job performed.
>
> Otherwise OK
>
> --
> Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
> phk at FreeBSD.ORG         | TCP/IP since RFC 956
> FreeBSD committer       | BSD since 4.3-tahoe
> Never attribute to malice what can adequately be explained by incompetence.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20141215/c2c12007/attachment.html>


More information about the varnish-dev mailing list