fix(scrapers/avito): unify _unix_to_date timezone across serp/houses/imv (#2129) #2142

Merged
lekss361 merged 1 commit from fix/avito-unix-date-tz into main 2026-07-02 14:03:12 +00:00

1 commit

Author SHA1 Message Date
e0dcc220dd fix(scrapers/avito): unify _unix_to_date timezone across serp/houses/imv (#2129)
All checks were successful
CI / changes (pull_request) Successful in 9s
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
Consolidate 3 divergent unix-epoch-to-date conversions (avito.py: MSK, documented
#726; avito_houses.py: UTC; avito_imv.py: naive/system-local) plus 3 duplicated
RUS_MONTHS dicts into a single app/services/scrapers/avito_shared.py module.

MSK is the correct canonical representation: Avito displays listing dates
(item-date, publishDate, price-history dates) in Europe/Moscow, and #726 already
established this to avoid off-by-one dates for listings bumped 00:00-03:00 MSK.
startPriceDate/lastPriceDate are always UTC-midnight in the source JSON so MSK
vs UTC never shifts them, but removedDate/publishDate carry real time-of-day and
DO shift for ~12.5% of events (21:00-23:59 UTC/local) once avito_imv.py/
avito_houses.py switch to MSK on the next scrape run.
2026-07-02 16:57:25 +03:00