Summary
test_blank_depth_to_water_still_creates_water_level_records fails because sample_date is stored with the local timezone offset instead of UTC.
Expected
datetime(2025, 2, 15, 10, 30, tzinfo=timezone.utc)
Actual
datetime(2025, 2, 15, 10, 30, tzinfo=timezone(timedelta(days=-1, seconds=57600)))
The offset timedelta(days=-1, seconds=57600) corresponds to UTC-7 (MDT).
Location
- Test:
tests/test_well_inventory.py::test_blank_depth_to_water_still_creates_water_level_records (line 692)
- Likely source:
services/well_inventory_csv.py — datetime handling during CSV upload
Reproduction
uv run pytest tests/test_well_inventory.py::test_blank_depth_to_water_still_creates_water_level_records -v
Summary
test_blank_depth_to_water_still_creates_water_level_recordsfails becausesample_dateis stored with the local timezone offset instead of UTC.Expected
Actual
The offset
timedelta(days=-1, seconds=57600)corresponds to UTC-7 (MDT).Location
tests/test_well_inventory.py::test_blank_depth_to_water_still_creates_water_level_records(line 692)services/well_inventory_csv.py— datetime handling during CSV uploadReproduction