♻️ Switch to using new startTime column (#1041)

This commit is contained in:
Luke Vella 2024-03-17 11:21:54 +07:00 committed by GitHub
parent bbbbf5ff49
commit a3e26bcc9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 57 additions and 137 deletions

View file

@ -217,8 +217,12 @@ export const DayjsProvider: React.FunctionComponent<{
);
const adjustTimeZone = React.useCallback(
(date: dayjs.ConfigType, keepLocalTime = false) => {
return dayjs(date).tz(preferredTimeZone, keepLocalTime);
(date: dayjs.ConfigType, localTime = false) => {
if (!localTime) {
return dayjs(date).tz(preferredTimeZone);
} else {
return dayjs(date).utc();
}
},
[preferredTimeZone],
);