def convert_exif_date(str): try: date = datetime.strptime(str, "%Y:%m:%d %H:%M:%S") except ValueError: return None return zulu(utc.fromutc(date))
def parse_zulu(txt): return utc.fromutc(datetime.strptime(txt, "%Y-%m-%dT%H:%M:%S.%fZ"))
def parse_zulu(txt): """Parses an ISO format date into a DateTime.""" return utc.fromutc(datetime.strptime(txt, "%Y-%m-%dT%H:%M:%S.%fZ"))
def time_from_unix(t): return utc.fromutc(datetime.utcfromtimestamp(t))
def time_from_unix(t): """Convert UTC timestamp int to its corresponding DateTime.""" return utc.fromutc(datetime.utcfromtimestamp(t))