basantjamwal opened a new pull request, #75723:
URL: https://github.com/apache/airflow/pull/75723

   ## What
   Windows recently merged its separate Pacific Standard/Daylight Time zones
   into a single unified "PT" zone name. Airflow's UI could not resolve this
   new name to a valid IANA timezone, so `selectedTimezone` ended up invalid.
   Since `Time.tsx` calls `selectedTimezone.toUpperCase()` without guarding
   against this, the entire UI crashed with:
   
       TypeError: Cannot read properties of undefined (reading 'toUpperCase')
   
   on any page that renders a time.
   
   ## Why
   `TimezoneProvider` previously stored whatever the OS/browser reported (or
   whatever was already cached in localStorage) without validating it. A bad
   value, once stored, persisted across sessions and broke every page.
   
   ## Fix
   `TimezoneProvider` now validates the stored/system timezone with
   `Intl.DateTimeFormat` before using it, and falls back to `UTC` when it
   cannot be resolved. This fixes the crash at its source rather than
   patching each place that reads `selectedTimezone`.
   
   ## Testing
   Added `TimezoneProvider.test.tsx` covering:
   - an invalid stored value (e.g. "PT") falls back to UTC
   - an empty stored value falls back to UTC
   - a valid stored value is used as-is
   
   Ran the full frontend test suite and `pnpm lint` locally — all passing.
   
   Closes: #75697
   
   ---
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   ---


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to