How to add values to timestamp in transform or firewall rule?

Hi, I’m trying to create a transform rule to set a dynamic header using the http.request.timestamp.sec. I would like to add 3600 seconds to it before assigning the header, in particular I would like to create an header called time and assign to it the value: time=http.request.timestamp.sec+3600 but when trying to deploy this rule I get the error ‘0xc00153ab10’ is not a valid value for expression because filter parsing error (1:27): http.request.timestamp.sec+3600 ^^^^^ unrecognised input.
How can I solve this error?

We dont have mathematical operators in either of these products (Rule operators and grouping symbols · Cloudflare Ruleset Engine docs) - if you want to do this you’d need to write a Worker that intercepts the timestamp, performs an addition, then recreates a new request header w/ that computed value.

Thank you, I have another question. What is the timezone of the http.request.timestamp.sec value?

The http.request.timestamp.sec field contains the current Unix time. Unix time is defined as the number of seconds since the Unix epoch (00:00:00 UTC on 1 January 1970).

Thank you very much

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.