Version: 1.2.0.0
stix.utils.dates Module¶
Functions¶
- stix.utils.dates.parse_value(value)¶
Attempts to parse value into an instance of datetime.datetime. If value is None, this function will return None.
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.
- stix.utils.dates.parse_date(value)¶
Attempts to parse value into an instance of datetime.date. If value is None, this function will return None.
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, None will be returned.
Parameters: value – A datetime.datetime value. Returns: An ISO8601 formatted timestamp string.
- stix.utils.dates.now()¶
Returns the current UTC datetime.datetime timestamp.