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

clarify datetime format is ISO 8601 #2673

Merged
merged 1 commit into from Aug 23, 2023
Merged

clarify datetime format is ISO 8601 #2673

merged 1 commit into from Aug 23, 2023

Conversation

jonathanstanley
Copy link
Contributor

@jonathanstanley jonathanstanley commented Aug 21, 2023

Small tweak to clarify docs for string.datetime(). current wording is

"defaults to UTC validation"

however, zod actually isn't validating javascript UTC string format (the following will not succeed with z.string().datetime()) ❌:

const utcDateTime = new Date().toUTCString(); // Mon, 21 Aug 2023 20:42:52 GMT

clarification to show that it is expecting ISO 8601 with no UTC offset. ex ✅:

const isoDateTime = new Date().toISOString(); // 2023-08-21T20:47:22.189Z

@netlify
Copy link

netlify bot commented Aug 21, 2023

Deploy Preview for guileless-rolypoly-866f8a ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 2820042
🔍 Latest deploy log https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/64e3cdd3c531f50008ac4c75
😎 Deploy Preview https://deploy-preview-2673--guileless-rolypoly-866f8a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@colinhacks colinhacks merged commit f59be09 into colinhacks:master Aug 23, 2023
5 checks passed
@colinhacks
Copy link
Owner

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants