[PATCH 2/2] Add std.rfc1123() to convert a formatted datetime to VCL_TIME
Poul-Henning Kamp
phk at phk.freebsd.dk
Mon Dec 15 21:12:08 CET 2014
--------
In message <CAJV_h0YFuL+OMcFckxAd+D9noX__aPRyLK17WA4m5Cm6f-XdQg at mail.gmail.com>
, Federico Schwindt writes:
>I thought about this and decided to go for rfc1123() as time() would
>indicate a TIME input with .integer(), .ip() and .real().
I simply don't grok that.
The idea behind the conversion functions is
std.${typename}(${convert_this}, ${use_this_if_you_cant})
Nothing prevents
std.time("Mon Dec 15 20:11:04 UTC 2014", std.now())
and
std.time("1418674264", std.now())
from giving the same result ?
>The other options I had in mind were datetime() and date() but I liked
>rfc1123() best.
I really hate rfc1123 as a name...
--
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.
More information about the varnish-dev
mailing list