Open alumuko opened 2 years ago
Hello, could you please clarify, would you like to change the "2021-09-01T00:00:00.000Z" to "2021-09-01 00:00:00" by deleting the T and .000Z? To me, it seems like there is no timezone difference, both are midnight of 9/01/21. Also the related issues cannot open.
"both are midnight of 9/01/21" is not correct.
"2021-09-01T00:00:00Z" has UTC time zone. The same time is AM 9.00 in Japan local time. "2021-09-01T00:00:00Z" and "2021-09-01T09:00:00+09:00" are same time.
"2021-09-01 00:00:00" has no time zone. It means midnight at local time. If you write in "2021-09-01 00:00:00" in Greenwich in Great Britain, it means "2021-09-01T00:00:00Z". If you write in "2021-09-01 00:00:00" in Japan, it means midnight in Japan, and it means "2021-08-31T15:00:00Z".
People don't prefer to calculate to Greenwich time before to input date time, especially for using local only system. So I need datetime input without time zone.
Description
The generator unintentionally convert a datetime without a time zone to a datetime with UTC time zone.
write in yaml
but web ui shows:
"dateTime2": "2021-09-01T00:00:00.000Z"
At least, there are the problem with "python-flask" and "nodejs-express-server" . but there aren't the problem with "html".
openapi-generator version
5.2.1.
OpenAPI declaration file content or url
Generation Details
java -jar openapi-generator-cli-5.2.1.jar generate -i test.yaml -g python-flask -o test-openapi-flask
java -jar openapi-generator-cli-5.2.1.jar generate -i test.yaml -g nodejs-express-server -o test-openapi-nodejs-express-server
java -jar openapi-generator-cli-5.2.1.jar generate -i test.yaml -g html -o test-openapi-html
Steps to reproduce
java -jar openapi-generator-cli-5.2.1.jar generate -i test.yaml -g python-flask -o test-openapi-flask cd test-openapi-flask python -m openapi_server
access http://localhost:8080/ui/#/default/test_date_time_get
Related issues/PRs
https://app.slack.com/client/TLQFRCNJZ/CLSB0U0R5
Suggest a fix