mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-16 09:31:50 +02:00
🐛 Fix date and time formatting and tz adjustment (#808)
This commit is contained in:
parent
acd28441a4
commit
58a04c63cd
3 changed files with 7 additions and 6 deletions
|
@ -213,10 +213,11 @@ export const DayjsProvider: React.FunctionComponent<{
|
|||
return (
|
||||
<DayjsContext.Provider
|
||||
value={{
|
||||
adjustTimeZone: (date, keepLocalTime) =>
|
||||
keepLocalTime
|
||||
? dayjs(date).tz("GMT")
|
||||
: dayjs(date).tz(preferredTimeZone),
|
||||
adjustTimeZone: (date, keepLocalTime) => {
|
||||
return keepLocalTime
|
||||
? dayjs(date).utc()
|
||||
: dayjs(date).tz(preferredTimeZone);
|
||||
},
|
||||
dayjs,
|
||||
locale,
|
||||
timeZone: preferredTimeZone,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue