We've been making changes to how we organize and display our docs. Our work isn't done but we'd love your feedback.

TIME

An absolute time. No literal syntax is provided for the TIME type; instead, see the std.time() function for creating a TIME value:

1
2
declare local var.t TIME;
set var.time = std.time("Fri, 21 Aug 1981 14:51:07 GMT", now);

Conversions to STRING values are rendered in RFC 1123 format, with the timezone in GMT:

1
2
3
declare local var.t TIME;
set var.t = std.time("Thu, 01 Jan 1970 00:00:00 GMT", now);
set resp.http.X-t = var.t; /* "Thu, 01 Jan 1970 00:00:00 GMT" */

Similar to RTIME values, a TIME value is a 64-bit signed integer, measured in nanoseconds since epoch.

Back to Top