-
Notifications
You must be signed in to change notification settings - Fork 6k
fix: serialize date as ISO string #10389
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
base: master
Are you sure you want to change the base?
fix: serialize date as ISO string #10389
Conversation
The standard 'Date#toString()' is only useful for readability, say in logs. It's far from ideal for API communication where the de facto standard is a ISO string.
@CodeNinjai there's no TypeScript maintainer listed, but as the Node/JavaScript maintainer, you ought to be good for this. |
No problem @CodeNinjai . You'll find it a simple change. Thanks for your time and attention. |
@CodeNinjai, any chance you can put an eye on this one? It's dead simple stuff. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks good to me.
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.3.0.0
branch for changes related to OpenAPI spec 3.0. Default:master
.Description of the PR
The standard 'Date#toString()' is only useful for readability, say in logs. It's far from ideal for API communication where the de facto standard is a ISO string.
This uses
Date.prototype.toISOString()
to serialize a Date for an API call.Closes #9571