Closed mark-mngoma closed 2 years ago
I chose 2020-09-18 but api response payload gives 2020-09-17
Our clients code is based on java version can you verify if the java application has the same bug ?
I have a java project running and it is fine, but I think the problem is within the dotnet client application neither java or dotnet server applications.
The dotnet client (angular) is exactly the same than java version. Which version of jhipster is on your java project?
They are not exactly. I am actually testing this project: https://github.com/jhipster/jhipster-sample-app-dotnetcore
The java project is running version 5.4.2, which is working fine.
This blueprint is base on jhipster 6.10.1
Yes it is, but the bug persists on this version as well as I am testing on the latest and it seems the date reverts a day back.
Ok i think is link to https://github.com/jhipster/generator-jhipster/issues/11740
This issue is not happening on the Java project, only the dotnet project.
Ok i will investigate this problem
Still an issue I am failing to resolve as I don't know whether the issue is how the date is parsed on the client application, because when I test on postman, everything works fine, so the issue is the client.
Can you give me more information i can't reproduce this on my machine, can you give me jdl / jhipster version / your machine os ?
It's this repo:https://github.com/jhipster/jhipster-sample-app-dotnetcore that I am running on the latest version of Windows 10 and also on docker.
you don't generate an application ? you use directly the sample ? ok can try to reproduce with the sample
Yes, I am using the sample project to reference the logic on the client application, especially when it comes to setting datepickers through moment.js as you're using it in the sample project.
I have a generated project, which I am referencing from the sample project.
Everything in the example is generated with the generator. But ok I will try again to reproduce.
Thanks for your feedback.
Sure, please just working in doing a form post on the client to see the issue as it doesn't occur when testing with swagger or postman.
Any field with datetime
I have try this but it's ok for me. Wich date format is on your os ?
Really? Does it not set to the date before? Like if you select 2020-06-04 then it persists as 2020-06-03?
My os datetime format is ddmmyyyy.
I have the same format. Can you try to generate an application with the latest version on the master ? ( you need to clone and call npm link
)
Using the jhipster generator and the jdl for entities or the demo repo?
Generator and jdl or you can also use entity cli
git clone
cd repo
npm link
jhipster --blueprints dotnetcore
jhipster entity YourEntity
I am still getting the same issue, I am testing with entity employee, field hireDate
I did everything here but I am still getting this issue. Please send me a screenshot of the process.
I am still receiving this issue on response payload it shows date as hireDate: 2020-09-22T22:00:00, but date chosen was: 2020-09-23T22:00:00
I am debugging and the timestamp is just being set at 22h00, I am not sure what config is handling this but it's on the client application, not the api.
It seems like this bug is some UTC parsing issue with Moment as it's happening with all the client applications from the dotnetcore generator.
sorry for the delay, yes it's possible that the error comes from moment.js and UTC
I am thoroughly reading the moment documentation but if you have an idea on fixing the bug please give me an update when possible.
in which timezone are you ?
SAST UTC+2
Can you try to add options.SerializerSettings.DateTimeZoneHandling = DateTimeZoneHandling.Utc;
in newtonsoft options in MvcStartup.cs ?
I have added. Issue still persists as is
I am testing the Java project and it's doing the same thing. Any ideas of configuring moment() properly?
It's a weird issue, very difficult to debug where it's coming from.
But it is definitely an issue on client application parsing the date properly.
if the bug il also on the java version can you open an issue on https://github.com/jhipster/generator-jhipster ?
check before if the issue is not already open
I managed to get this fixed but it would be great for you to look at it and fix it for future releases.
@NtsikaMngoma how did you fix it ?
@NtsikaMngoma how did you fix it ? https://github.com/jhipster/generator-jhipster/issues/12577
Ok but we need to take open this issue while the other issue is not resolve
It's the same issue, should I close it or will you close it once resolved?
Please have a look at this issue as I am battling to figure it out: https://github.com/jhipster/jhipster-dotnetcore/issues/378
I have been testing the sample dotnet project and notice that the client app has an issue is saving dates previous to the one inputted on the form but it works well with postman. Is the issue in this line of code: if (!employee.id) { const today = moment().startOf('day'); employee.hireDate = today; } in the employee-update component?