diff --git a/README.md b/README.md index a721693b1..9c6a59aee 100644 --- a/README.md +++ b/README.md @@ -835,6 +835,14 @@ datetime.parse("2020-01-01T00:00:00.123+02"); // pass (only offset hours) datetime.parse("2020-01-01T00:00:00Z"); // pass (Z still supported) ``` +You can allow unqualified (timezone-less) datetimes using the `local: true` flag. + +```ts +const schema = z.string().datetime({ local: true }); + +schema.parse("2020-01-01T00:00:00"); // pass +``` + You can additionally constrain the allowable `precision`. By default, arbitrary sub-second precision is supported (but optional). ```ts