<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_time(self, idx):
 """Time for each TIFF file If there are no metadata keyword arguments defined for the TIFF file format, then the zip file `date_time` value is used. """

        # first try to get the time from the TIFF file
        # (possible meta data keywords)
        ds = self._get_dataset(idx)
        thetime = ds.get_time()
        if np.isnan(thetime):
            # use zipfile date_time
            zf = zipfile.ZipFile(self.path)
            info = zf.getinfo(self.files[idx])
            timetuple = tuple(list(info.date_time) + [0, 0, 0])
            thetime = time.mktime(timetuple)
        return thetime