Skip to content

test: Using local time in unit test fails in certain time zones #1540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 18, 2022

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented May 17, 2022

This test was failing when running in CST (GMT-5) timezone.
My local timezone pushed the next to the upcoming monday

@johnstcn Is this change to the test ok? I was not really sure what it was testing. The CI says "Without timezone", but the spec does include the timezone as UTC.

This test was failing when running in CST (GMT-5) timezone.
My local timezone pushed the next to the upcoming monday
@Emyrk Emyrk requested a review from johnstcn May 17, 2022 23:45
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @Emyrk, thank you!

@johnstcn
Copy link
Member

@Emyrk I went ahead and also added a commit that fixes the test semantics properly.

@Emyrk Emyrk enabled auto-merge (squash) May 18, 2022 12:57
@Emyrk Emyrk merged commit 4e28b2d into main May 18, 2022
@Emyrk Emyrk deleted the stevenmasley/time_zone_test branch May 18, 2022 13:09
kylecarbs pushed a commit that referenced this pull request Jun 10, 2022
* test: Using local time in unit test fails in certain time zones

This test was failing when running in CST (GMT-5) timezone.
My local timezone pushed the next to the upcoming monday

* fix: schedule: assert expected result of String() separately from input spec

Co-authored-by: Cian Johnston <cian@coder.com>
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.

3 participants