Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datetime with invalid timezone passes #3883

Open
matowang opened this issue Dec 5, 2024 · 0 comments
Open

datetime with invalid timezone passes #3883

matowang opened this issue Dec 5, 2024 · 0 comments

Comments

@matowang
Copy link

matowang commented Dec 5, 2024

Ideally the timezone offset should be just as strict as the time.

z.string().datetime().parse("2022-01-01T00:99:00Z"); // fails
//                                         ^
z.string().datetime().parse("2022-01-01T00:00:00+99:00"); // passes
//                                               ^

Hours (HH): 00 to 23
Minutes (MM): 00 to 59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant