Skip to content

Make tests pass in western hemisphere#15387

Merged
pmoleri merged 6 commits intomasterfrom
pmoleri/make-tests-pass-in-western-hemisphere
Feb 28, 2025
Merged

Make tests pass in western hemisphere#15387
pmoleri merged 6 commits intomasterfrom
pmoleri/make-tests-pass-in-western-hemisphere

Conversation

@pmoleri
Copy link
Copy Markdown
Contributor

@pmoleri pmoleri commented Feb 20, 2025

Fix tests run to be able to run in US ET timezone without errors.

  • First commit sets tests to run in America/New_York time zone.
    See results: https://github.com/IgniteUI/igniteui-angular/actions/runs/13441426761
    Note: TZ env var trick doesn't seem to work on Windows. Change PC timezone instead.

  • Second commit fixes the tests by making sure that all dates are in local timezone.
    e.g.

    • new Date('2025-01-01') -> 2024-12-31 19:00 GMT -05:00 ❌ produces invalid results
    • ymd('2025-01-01') -> 2025-01-01 19:00 GMT -05:00

See also Angular's explanation here, which is what they use for their Date pipe.

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

To check support for negative timezones
@pmoleri pmoleri changed the title chore(tests): Make tests run in US ET timezone Make tests pass in western hemisphere Feb 20, 2025
@pmoleri pmoleri requested a review from damyanpetev February 20, 2025 18:46
@pmoleri pmoleri marked this pull request as ready for review February 21, 2025 12:39
kdinev
kdinev previously approved these changes Feb 21, 2025
@pmoleri pmoleri removed the request for review from damyanpetev February 27, 2025 21:18
@pmoleri pmoleri merged commit 4c537ec into master Feb 28, 2025
5 checks passed
@pmoleri pmoleri deleted the pmoleri/make-tests-pass-in-western-hemisphere branch February 28, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants