2022-05-05 16:18:00 +00:00
|
|
|
import tzdata from "tzdata";
|
2022-04-27 17:25:36 +00:00
|
|
|
import * as z from "zod";
|
|
|
|
|
|
|
|
// @note: This is a custom validation that checks if the timezone is valid and exists in the tzdb library
|
2022-05-05 16:18:00 +00:00
|
|
|
export const timeZone = z.string().refine((tz: string) => Object.keys(tzdata.zones).includes(tz));
|