Version: 1.2.0.11
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,Nonewill be returned.Parameters: value – A datetime.datetime value. Returns: An ISO8601 formatted timestamp string.
-
stix.utils.dates.parse_date(value)¶ Attempts to parse value into an instance of
datetime.date. If value isNone, this function will returnNone.Parameters: value – A timestamp. This can be a string, datetime.date, or datetime.datetime value.
-
stix.utils.dates.serialize_value(value) Attempts to convert value into an ISO8601-compliant timestamp string. If value is
None,Nonewill be returned.Parameters: value – A datetime.datetime value. Returns: An ISO8601 formatted timestamp string.
-
stix.utils.dates.now()¶ Returns the current UTC
datetime.datetimetimestamp.