mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-25 01:39:53 +00:00
Fix timezone with _ display (#4793)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
1967e8e5dc
commit
77ac277596
@ -138,8 +138,10 @@ export function getFormattedDate (value: number | null, options?: Intl.DateTimeF
|
||||
return value === null ? '' : new Date(value).toLocaleString('default', options ?? { month: 'short', day: 'numeric' })
|
||||
}
|
||||
|
||||
export const getTimeZoneName = (val: string = Intl.DateTimeFormat().resolvedOptions().timeZone): string => {
|
||||
return val.split('/')[1] ?? ''
|
||||
export const getTimeZoneName = (
|
||||
val: string = Intl.DateTimeFormat().resolvedOptions().timeZoneName ?? Intl.DateTimeFormat().resolvedOptions().timeZone
|
||||
): string => {
|
||||
return val.replace('_', ' ').split('/')[1] ?? ''
|
||||
}
|
||||
|
||||
export const convertTimeZone = (tz: string): TimeZone => {
|
||||
|
Loading…
Reference in New Issue
Block a user