diff --git a/src/lib/yup.ts b/src/lib/yup.ts index 2407f7ad..5bd0aa18 100644 --- a/src/lib/yup.ts +++ b/src/lib/yup.ts @@ -2,11 +2,14 @@ import moment from 'moment'; import * as yup from 'yup'; import { UNIT_TYPES } from './constants'; -export const TimezoneTest = yup.string().test( - 'timezone', - () => `Invalid timezone`, - value => moment.tz.zone(value) !== null, -); +export const TimezoneTest = yup + .string() + .default('UTC') + .test( + 'timezone', + () => `Invalid timezone`, + value => moment.tz.zone(value) !== null, + ); export const UnitTypeTest = yup.string().test( 'unit',