Past minute 30 of the wall clock the next forecast hour is closer to utc_now() than the current hour, so the picker would land on (e.g.) 19:00Z when the user is at 18:43Z. HRRR has 19:00Z, but the HRDPS chain only seeds the *current* hour (18:00Z), so the dual-source map showed an empty Canadian half whenever we crossed the half-hour mark. Switch to "most-recent valid_time <= now", with a fallback to the closest future when nothing on disk is yet at-or-before now (cold start). Hoist the picker into a public function so it can be unit- tested deterministically — anchoring the integration test on DateTime.utc_now() truncated to the hour would have only verified the new behavior past minute 30. /weather-ca delegates to the same picker so the two maps agree on "current." |
||
|---|---|---|
| .. | ||
| components | ||
| controllers | ||
| live | ||
| plugs | ||
| endpoint.ex | ||
| live_helpers.ex | ||
| live_table_footer.ex | ||
| live_table_resource.ex | ||
| location_resolver.ex | ||
| metrics_plug.ex | ||
| router.ex | ||
| skew_t.ex | ||
| telemetry.ex | ||
| user_auth.ex | ||