Obtain DARKTIME

def get_darktime(self, img):
        """Obtain DARKTIME"""
        header = self.get_header(img)
        if 'DARKTIME' in header.keys():
            return header['DARKTIME']
        else:
            return self.get_exptime(img)