Add support to parse DateTImes with UTC offset
This commit is contained in:
parent
fdae46a548
commit
15e3cc3b8c
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue