@staticmethod<EOL><INDENT>def datetime_str_to_timestamp(datetime_str):<DEDENT>
try:<EOL><INDENT>dtf = DTFormat()<EOL>struct_time = time.strptime(datetime_str, dtf.datetime_format)<EOL>return time.mktime(struct_time)<EOL><DEDENT>except:<EOL><INDENT>return None<EOL><DEDENT>
'2018-01-01 00:00:00' (str) --> 1514736000

:param str datetime_str: datetime string
:return: unix timestamp (int) or None
:rtype: int or None