def get_start_duration(start_time=None, end_time=None):
    
    if start_time:
        start_time_sec = calendar.timegm(start_time.timetuple())
        if end_time:
            duration = end_time - start_time
            duration = duration.total_seconds()
        else:
            duration = None
    else:
        start_time_sec = None
        duration = None
        
    return (start_time_sec, duration)
Get the start_time and duration in POSIX seconds from the epoch.
dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/expedient_geni/planetlab/sfa-models.py/get_start_duration