1
Fork 0

Merge pull request #802 from john-dev/patch-1

Add support to parse DateTimes with UTC+Offset
This commit is contained in:
Viktor Strate Kløvedal 2023-02-15 10:05:29 +01:00 committed by GitHub
commit 87e80cf21f
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 {
found_exif = true
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
}