Skip to main content

EFFECTIVE_DATE_SQL

Constant EFFECTIVE_DATE_SQL 

Source
pub const EFFECTIVE_DATE_SQL: &str = "CASE WHEN exif_date IS NOT NULL \
     AND exif_date NOT LIKE '0000%' THEN exif_date ELSE modified_at END";
Expand description

The date a file is considered to have: its EXIF capture date when that is present and valid, otherwise the filesystem modification time.

The 0000% guard matches output.rs::best_date: a camera with an unset clock writes 0000-00-00T00:00:00, which must fall back rather than being treated as year zero.