feat(dates): calendar-day date filters in the owner's display zone (#152)
/photos, /photos/exif and unified search take date_from_day / date_to_day (YYYY-MM-DD): the server turns them into the first day's start and the last day's end in the owner's display zone, the same days /memories groups by. Each replaces its instant counterpart. Clients stop computing midnights in the device's zone, which drifted by the travel offset whenever the phone's zone differed from display_tz. e2e check: every fixture is included by its display-zone day and excluded by the days either side. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f1779358b5
commit
30803dca54
5 files changed
+133
-5
No files matched your search
+9
-1
@@ -153,9 +153,13 @@ pub struct FilesRequest {
|
||||
|
||||
// Date range filtering: inclusive true instants (unix seconds), compared
|
||||
// against each row's true instant (ADR-0001, #152). For calendar days,
|
||||
// send the day's bounds in the owner's display zone.
|
||||
// send `date_from_day` / `date_to_day` (`YYYY-MM-DD`) instead: the server
|
||||
// takes their bounds in the owner's display zone, and each replaces its
|
||||
// instant counterpart.
|
||||
pub date_from: Option<i64>,
|
||||
pub date_to: Option<i64>,
|
||||
pub date_from_day: Option<String>,
|
||||
pub date_to_day: Option<String>,
|
||||
|
||||
// Media type filtering
|
||||
pub media_type: Option<MediaType>,
|
||||
@@ -538,6 +542,10 @@ pub struct ExifBatchRequest {
|
||||
pub date_from: Option<i64>,
|
||||
/// Upper bound (inclusive). Same semantics as `date_to` on `/photos`.
|
||||
pub date_to: Option<i64>,
|
||||
/// Calendar-day bounds (`YYYY-MM-DD`) in the owner's display zone; each
|
||||
/// replaces its instant counterpart. Same as on `/photos`.
|
||||
pub date_from_day: Option<String>,
|
||||
pub date_to_day: Option<String>,
|
||||
/// Restrict results to a single library by id. Omit (or "" / "all") for
|
||||
/// union mode — the default. Filtered post-query in the handler so the
|
||||
/// existing `query_by_exif` DAO trait stays untouched.
|
||||
|
||||
Reference in new issue
Block a user