Metadata: Add date string defaults to be ignored #3229

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2023-02-24 16:21:17 +01:00
parent 6f578af5c1
commit 77714e8e3f

View file

@ -29,9 +29,16 @@ func EmptyDateTime(s string) bool {
return true return true
case "0", "00", "0000", "0000:00:00", "00:00:00", "0000-00-00", "00-00-00": case "0", "00", "0000", "0000:00:00", "00:00:00", "0000-00-00", "00-00-00":
return true return true
case " : : : : ", " - - - - ", " - - : : ":
// Exif default.
return true
case "0000:00:00 00:00:00", "0000-00-00 00-00-00", "0000-00-00 00:00:00": case "0000:00:00 00:00:00", "0000-00-00 00-00-00", "0000-00-00 00:00:00":
return true return true
case "0001-01-01 00:00:00", "0001-01-01 00:00:00 +0000 UTC": case "0001:01:01 00:00:00", "0001-01-01 00-00-00", "0001-01-01 00:00:00":
// Go default.
return true
case "0001:01:01 00:00:00 +0000 UTC", "0001-01-01 00-00-00 +0000 UTC", "0001-01-01 00:00:00 +0000 UTC":
// Go default with time zone.
return true return true
default: default:
return false return false