[master] d3abcede8 Improve VCL now documentation
Nils Goroll
nils.goroll at uplex.de
Mon Jul 11 14:01:06 UTC 2022
commit d3abcede80622ab296fc77f349669c9d6d47278b
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Tue Mar 16 14:53:14 2021 +0100
Improve VCL now documentation
diff --git a/doc/sphinx/reference/vcl_var.rst b/doc/sphinx/reference/vcl_var.rst
index be15b6448..da3efa560 100644
--- a/doc/sphinx/reference/vcl_var.rst
+++ b/doc/sphinx/reference/vcl_var.rst
@@ -1417,6 +1417,15 @@ now
When converted to STRING in expressions it returns
a formatted timestamp like ``Tue, 20 Feb 2018 09:30:31 GMT``
+ ``now`` remains stable for the duration of any built-in VCL
+ subroutine to make time-based calculations predictable and
+ avoid edge cases.
+
+ In other words, even if considerable amounts of time are spent
+ in VCL, ``now`` will always represent the point in time when
+ the respective built-in VCL subroutine was entered. ``now`` is
+ thus not suitable for any kind of time measurements. See
+ :ref:`std.timestamp()` in :ref:`vmod_std(3)`.
sess
~~~~
More information about the varnish-commit
mailing list