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: accomodate input timezone while create user without on-boarding and default timezone #18288

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Schedule" ALTER COLUMN "timeZone" SET DEFAULT 'Europe/London';
2 changes: 1 addition & 1 deletion packages/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ model Schedule {
eventType EventType[]
instantMeetingEvents EventType[] @relation("InstantMeetingSchedule")
name String
timeZone String?
timeZone String? @default("Europe/London")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we having "Europe/London" as default timeZone 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"Europe/London" timezone aligns with UTC or has UTC +0, probably that's why its chosen as default timezone even for users

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we directly use UTC timeZone, I think that would be better 🤔 .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

to be in sync with default value for timezone in other tables - User, Team and other places in code, i think it's better to go with Europe/London.

Copy link
Contributor

Choose a reason for hiding this comment

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

cool 🆒

Copy link
Member

Choose a reason for hiding this comment

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

@emrysal any thoughts in here? Are we comfortable setting this default at DB level?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see why not, but I don't really adore the idea of default schedules as a whole.

availability Availability[]
Host Host[]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ export async function createNewUsersConnectToOrgIfExists({
})),
},
},
...(timeZone && { timeZone }),
},
},
},
Expand Down
Loading