Version: 1.1.1.8
stix.utils.dates
Module¶
Functions¶
-
stix.utils.dates.
parse_value
(value)¶ Attempts to parse value into an instance of
datetime.datetime
. If value isNone
, this function will returnNone
.Parameters: value – A timestamp. This can be a string or datetime.datetime value.
-
stix.utils.dates.
serialize_value
(value)¶ Attempts to convert value into an ISO8601-compliant timestamp string. If value is
None
,None
will be returned.Parameters: value – A datetime.datetime value. Returns: An ISO8601 formatted timestamp string.