MCPcopy
hub / github.com/InstaPy/InstaPy / get_epoch_time_diff

Function get_epoch_time_diff

instapy/util.py:2246–2259  ·  view source on GitHub ↗
(time_stamp, logger)

Source from the content-addressed store, hash-verified

2244
2245
2246def get_epoch_time_diff(time_stamp, logger):
2247 try:
2248 # time diff in seconds from input to now
2249 log_time = datetime.datetime.strptime(time_stamp, "%Y-%m-%d %H:%M")
2250
2251 former_epoch = (log_time - datetime.datetime(1970, 1, 1)).total_seconds()
2252 cur_epoch = (
2253 datetime.datetime.now() - datetime.datetime(1970, 1, 1)
2254 ).total_seconds()
2255
2256 return cur_epoch - former_epoch
2257 except ValueError:
2258 logger.error("Error occurred while reading timestamp value from database")
2259 return None
2260
2261
2262def is_follow_me(browser, person=None):

Callers 2

unfollowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected