Code Room
Code reviewMediumcr-g109
Subject TimezoneLevel Mid–Senior~25 minCommon in Code quality & review interviewsIndustries Software development

Question

Review this Python scheduling helper.

What a strong answer looks like

Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.

Talk through your review
Code to reviewpython
from datetime import datetime, timedelta def next_run(local_dt: datetime) -> datetime:    # local_dt is a naive datetime in America/New_York,    # we want "same wall-clock time tomorrow"    return local_dt + timedelta(days=1) def seconds_until(local_dt: datetime) -> float:    return (local_dt - datetime.now()).total_seconds()
Run or narrate your approach, then ask the coach.