timestamp.current_seconds

Supported in:
timestamp.current_seconds()

Description

Returns an integer representing the current time in Unix seconds. This is approximately equal to the detection timestamp and is based on when the rule is run. This function is a synonym of the function timestamp.now().

Param data types

NONE

Return type

INT

Code samples

Example 1

The following example returns true if the certificate has been expired for more than 24 hours. It calculates the time difference by subtracting the current Unix seconds, and then comparing using a greater than operator.

86400 < timestamp.current_seconds() - $e.network.tls.certificate.not_after