1
Fork 0

Add support to parse DateTImes with UTC offset

This commit is contained in:
john dev 2023-02-15 08:29:41 +01:00 committed by GitHub
parent fdae46a548
commit 15e3cc3b8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -119,6 +119,13 @@ func (p *externalExifParser) ParseExif(media_path string) (returnExif *models.Me
if err == nil { if err == nil {
found_exif = true found_exif = true
newExif.DateShot = &dateTime newExif.DateShot = &dateTime
} else {
layoutWithOffset := "2006:01:02 15:04:05+02:00"
dateTime, err = time.Parse(layoutWithOffset, date)
if err == nil {
found_exif = true
newExif.DateShot = &dateTime
}
} }
break break
} }