2020-11-09 22:09:04 -05:00
|
|
|
import { secondsToHours } from '~/lib/utils/datetime_utility';
|
|
|
|
|
|
|
|
export const freezePeriodsFixture = getJSONFixture('/api/freeze-periods/freeze_periods.json');
|
2021-09-01 14:08:49 -04:00
|
|
|
export const timezoneDataFixture = getJSONFixture('/timezones/short.json');
|
2020-11-09 22:09:04 -05:00
|
|
|
|
|
|
|
export const findTzByName = (identifier = '') =>
|
|
|
|
timezoneDataFixture.find(({ name }) => name.toLowerCase() === identifier.toLowerCase());
|
|
|
|
|
|
|
|
export const formatTz = ({ offset, name }) => `[UTC ${secondsToHours(offset)}] ${name}`;
|