Logo Search packages:      
Sourcecode: rapid-photo-downloader version File versions  Download package

def rapid::metadata::MetaData::filterMangledDates (   self,
  d 
)

Some EXIF dates are badly formed. Try to fix them

Definition at line 375 of file metadata.py.

00375                                    :
        """
        Some EXIF dates are badly formed. Try to fix them
        """
        
        _datetime = d.strip()
        # remove any weird characters at the end of the string
        while _datetime and not _datetime[-1].isdigit():
            _datetime = _datetime[:-1]
        _date,  _time = _datetime.split(' ')
        _datetime = "%s %s" % (_date.replace(":",  "-") ,  _time.replace("-",  ":"))
        try:
            d = datetime.datetime.strptime(_datetime, '%Y-%m-%d %H:%M:%S')
        except:
            d = None
        return d
                
    def dateTime(self, missing=''):


Generated by  Doxygen 1.6.0   Back to index