Stem Docs

Util

Util

Utility functions used by the stem library.

stem.util.__init__.datetime_to_unix(timestamp)[source]

Converts a utc datetime object to a unix timestamp.

New in version 1.5.0.

Parameters:timestamp (datetime) -- timestamp to be converted
Returns:float for the unix timestamp of the given datetime object