Step 1, for Mac, you can install exifread
library
import io
from PIL import Image
import exifread
if __name__ == '__main__':
filename = "IMG_0675.HEIC"
# Open image file for reading (binary mode)
f = open(filename, 'rb')
# Return Exif tags
tags = exifread.process_file(f)
time = tags.get('Image DateTime')
print(time)