This function fetches the timestamp and saves the new timestamp to TIMESTAMP file in the current directory.

fetch_and_save_timestamp(self, datetime_format=False, timezone=False, new_timestamp=SiemplifyUtils.unix_now())

Parameters:

Param Name Param Type Possible Values Comments Mandatory Parameter
datetime_format boolean True/False True will return the datetime after converting the unixtime and False will simply return the datetime No
timezone boolean True/False If True, siemplify will convert the time zone. [Not supported for DST] No
new_timestamp long datetime New timestamp as datetime to be saved. The default timestamp is the current time. No

Return Type

Datetime/int

Example:

Sample Code
from SiemplifyAction import SiemplifyAction
sa = SiemplifyAction() 
sa.fetch_and_save_timestamp(self, datetime_format=False, timezone=False, new_timestamp=Siemplif
yUtils.unix_now())
Result Behavior
The latest timestamp is fetched and is saved as TIMESTAMP file in the current directory. 
Result Value
datetime.datetime(2019, 7, 16, 14, 26, 2, 26000)/1563276380