Skip to content

fix: Ensure rendering as UTC to prevent browser tz from messing up times#10113

Merged
zomars merged 2 commits intomainfrom
bugfix/timezone-related-date-override-fixes
Jul 13, 2023
Merged

fix: Ensure rendering as UTC to prevent browser tz from messing up times#10113
zomars merged 2 commits intomainfrom
bugfix/timezone-related-date-override-fixes

Conversation

@emrysal
Copy link
Copy Markdown
Contributor

@emrysal emrysal commented Jul 12, 2023

What does this PR do?

Fixes all date shifts that are due browser time, by ensuring everything is UTC so it's not transformed to different times.

The times weren't actually shifting, dates were, but after casting these to UTC properly the times were also shifting; so that was a bug after a bugfix, time wise it was only a problem to determine all day events (which didn't completely work)

Yes, but how do I test this?

Before:
Create a all day date override in +05:30
Shift your local system time to -04:00
Note that the day is different

After - do the same:
The day is the same!

Fixes #8365
Fixes #6978
Fixes #6482

@vercel
Copy link
Copy Markdown

vercel Bot commented Jul 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2023 10:18pm
cal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2023 10:18pm
cal-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2023 10:18pm
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2023 10:18pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 12, 2023

Thank you for following the naming conventions! 🙏

@zomars zomars added the core area: core, team members only label Jul 12, 2023
@emrysal emrysal requested a review from a team July 12, 2023 22:05
@emrysal emrysal assigned CarinaWolli and unassigned CarinaWolli Jul 12, 2023
@emrysal emrysal requested a review from CarinaWolli July 12, 2023 22:05
@alwaysmeticulous
Copy link
Copy Markdown

alwaysmeticulous Bot commented Jul 12, 2023

🤖 Meticulous spotted visual differences in 73 of 207 screens tested: view and approve differences detected.

Last updated for commit 22ddc0d. This comment will update as new commits are pushed.

@github-actions
Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@deploysentinel
Copy link
Copy Markdown

deploysentinel Bot commented Jul 12, 2023

Current Playwright Test Results Summary

✅ 88 Passing - ⚠️ 5 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 07/12/2023 10:17:48pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 22ddc0d

Started: 07/12/2023 10:15:03pm UTC

⚠️ Flakes

📄   packages/app-store/routing-forms/playwright/tests/basic.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Routing Forms Seeded Routing Form Router URL should work
Retry 1Initial Attempt
0% (0) 0 / 223 runs
failed over last 7 days
4.93% (11) 11 / 223 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 3 Flakes

Top 1 Common Error Messages

null

3 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Popup Tests should be able to reschedule
Retry 1Initial Attempt
2.33% (1) 1 / 43 run
failed over last 7 days
97.67% (42) 42 / 43 runs
flaked over last 7 days
Popup Tests should open embed iframe on click - Configured with light theme
Retry 1Initial Attempt
2.33% (1) 1 / 43 run
failed over last 7 days
16.28% (7) 7 / 43 runs
flaked over last 7 days
Popup Tests should open Routing Forms embed on click
Retry 1Initial Attempt
0% (0) 0 / 43 runs
failed over last 7 days
18.60% (8) 8 / 43 runs
flaked over last 7 days

📄   apps/web/playwright/integrations-stripe.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Stripe integration Pending payment booking should not be confirmed by default
Retry 1Initial Attempt
0.62% (2) 2 / 323 runs
failed over last 7 days
10.22% (33) 33 / 323 runs
flaked over last 7 days

View Detailed Build Results


@PeerRich PeerRich added High priority Created by Linear-GitHub Sync bookings area: bookings, availability, timezones, double booking labels Jul 12, 2023
Copy link
Copy Markdown
Contributor

@zomars zomars left a comment

Choose a reason for hiding this comment

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

cool

@zomars zomars merged commit 605f7d3 into main Jul 13, 2023
@zomars zomars deleted the bugfix/timezone-related-date-override-fixes branch July 13, 2023 00:32
@zomars
Copy link
Copy Markdown
Contributor

zomars commented Jul 13, 2023

@zomars merged this pull request with Graphite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bookings area: bookings, availability, timezones, double booking core area: core, team members only High priority Created by Linear-GitHub Sync

Projects

No open projects
Status: No status

4 participants