Skip to content

fix(CI): use America/New_York instead of EST for unit tests - #12700

Merged
rebeccaalpert merged 1 commit into
patternfly:felt-v1from
gabipodolnikova:ci-tz-america-new-york
Oct 30, 2026
Merged

rebeccaalpert merged 1 commit into
patternfly:felt-v1from
gabipodolnikova:ci-tz-america-new-york

Conversation

@gabipodolnikova

Copy link
Copy Markdown
Contributor

What: Fixes the 3 failing Timestamp unit tests that have been breaking the Unit tests job on every PR since Oct 29 (no issue filed).

Additional issues: none

What happened

Since Oct 29 the Unit tests job fails with 3 timezone-dependent failures in packages/react-core/src/components/Timestamp/__tests__/Timestamp.test.tsx, e.g.:

expect(screen.getByText('1/1/2022, 5:00:00 AM UTC')).toBeInTheDocument()
Unable to find an element with the text: 1/1/2022, 5:00:00 AM UTC
(rendered: 1/1/2022, 12:00:00 AM Coordinated Universal Time)

The root test script runs jest with TZ=EST. Between the last passing run (Oct 27) and the first failing run (Oct 29), GitHub's ubuntu-latest image migrated from ubuntu-24.04 (20261012.334.1) to ubuntu-26.04 (20261025.179.1) — same Node version. On the newer image, TZ=EST no longer applies the expected UTC−5 offset; jest runs as UTC instead (reproducible locally: TZ=UTC produces exactly these 3 failures, TZ=EST passes).

EST is a legacy POSIX-style abbreviation rather than a real IANA zone, so depending on it is fragile.

The fix

Replace TZ=EST with TZ=America/New_York in the root test script. It is identical to EST (UTC−5, standard time) for every date used in the Timestamp tests — all of them fall in January/February — so no expected values change:

  • TZ=America/New_York yarn jest packages/react-core/src/components/Timestamp → 26 passed, 1 skipped
  • Full yarn test passes locally with the change

Verification

  • yarn test (full suite) on this branch

Since Oct 29 the Unit tests job fails 3 timezone-dependent Timestamp
tests on every PR. The root test script runs jest with TZ=EST, and
GitHub's ubuntu-latest image migrated from ubuntu-24.04 to ubuntu-26.04
between the last passing run (Oct 27) and the first failure (Oct 29);
on the newer image TZ=EST no longer applies the UTC-5 offset and jest
runs as UTC instead.

EST is a legacy POSIX-style abbreviation rather than an IANA zone.
America/New_York is identical to EST (UTC-5, standard time) for every
date used in the Timestamp tests (all in January/February), so no
expected values change. Full suite passes: 396 suites, 3902 tests,
914 snapshots.
@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 812fd5b2-bd7b-4400-b7b4-b5a110a88ec7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rebeccaalpert
rebeccaalpert merged commit f72299d into patternfly:felt-v1 Oct 30, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants