fetch_timestamp
This function returns the timestamp.
fetch_timestamp(datetime_format=False, timezone=False)
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 |
Return Type
Datetime/int
Example:
Sample Code
from SiemplifyAction import SiemplifyAction
sa = SiemplifyAction()
result = sa.fetch_timestamp(datetime_format=True, timezone=False)
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