Date formatting per workspace member settings (#6408)
Implement date formatting per workspace member settings We'll need another round to maybe initialize all workspaces on the default settings. For now the default behavior is to take system settings if nothing is found in DB. --------- Co-authored-by: Weiko <corentin@twenty.com>
This commit is contained in:
@ -1,6 +0,0 @@
|
||||
/**
|
||||
* Detects the user's time zone.
|
||||
* @returns a IANA time zone
|
||||
*/
|
||||
export const detectTimeZone = () =>
|
||||
Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
@ -1,10 +0,0 @@
|
||||
import { AVAILABLE_TIME_ZONE_OPTIONS_BY_LABEL } from '@/settings/accounts/constants/AvailableTimezoneOptionsByLabel';
|
||||
import { formatTimeZoneLabel } from '@/settings/accounts/utils/formatTimeZoneLabel';
|
||||
|
||||
/**
|
||||
* Finds the matching available IANA time zone select option from a given IANA time zone.
|
||||
* @param value the IANA time zone to match
|
||||
* @returns the matching available IANA time zone select option or undefined
|
||||
*/
|
||||
export const findAvailableTimeZoneOption = (value: string) =>
|
||||
AVAILABLE_TIME_ZONE_OPTIONS_BY_LABEL[formatTimeZoneLabel(value)];
|
||||
Reference in New Issue
Block a user