Skip to content
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

fix: timezone dependent unit test fail when not on utc #15377

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Shaik-Sirajuddin
Copy link
Contributor

What does this PR do?

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected)
  • I have added a Docs issue here if this PR makes changes that would require a documentation change
  • I have added or modified automated tests that prove my fix is effective or that my feature works (PRs might be rejected if logical changes are not properly tested)

How should this be tested?

  • run TZ=MST yarn test
  • all tests would be passed
  • around 5 tests resulted in failure before the fix.

Copy link

vercel bot commented Jun 8, 2024

Someone is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Jun 8, 2024
@graphite-app graphite-app bot requested a review from a team June 8, 2024 16:18
@github-actions github-actions bot added automated-tests area: unit tests, e2e tests, playwright Medium priority Created by Linear-GitHub Sync 🐛 bug Something isn't working labels Jun 8, 2024
Copy link
Contributor

github-actions bot commented Jun 8, 2024

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

@dosubot dosubot bot added this to the v4.3 milestone Jun 8, 2024
Copy link

graphite-app bot commented Jun 8, 2024

Graphite Automations

"Add community label" took an action on this PR • (06/08/24)

1 label was added to this PR based on Keith Williams's automation.

"Add consumer team as reviewer" took an action on this PR • (06/08/24)

1 reviewer was added to this PR based on Keith Williams's automation.

const dateFrom = dayjs().month(10).date(1).startOf("day");
const dateTo = dayjs().month(10).endOf("month");
const dateFrom = dayjs.utc().month(10).date(1).startOf("day");
const dateTo = dayjs.utc().month(10).endOf("month");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

using dayjs.utc to avoid change of date ( incremented to next day )
while using dayjs.endOf in certain timezones

@Shaik-Sirajuddin Shaik-Sirajuddin marked this pull request as draft June 8, 2024 16:38
@dosubot dosubot bot modified the milestones: v4.3, v4.4 Jun 11, 2024
@keithwillcode keithwillcode added this to the v4.4 milestone Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated-tests area: unit tests, e2e tests, playwright 🐛 bug Something isn't working community Created by Linear-GitHub Sync Medium priority Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-3672] Timezone dependent unit tests fail when not on UTC
2 participants