Hi Nikolaos,
Probably need a little help here.
FYI, I'm in GMT 8, right now and at the time I' m inserting a new record in dataverse is '2021-10-27 01:00:00 PM'
So at first I'm trying this ->
utcdatetime convertedProjectDate = DateTimeUtil::newDateTime(this.ProjectDate, 0, DateTimeUtil::getCompanyTimeZone());
this.ProjectDate = DateTimeUtil::date(convertedProjectDate);
This resulted a very weird date in F&O which is '2021-10-24', I don't know what is the logic to come up with that.....
.. so 2ndly, I'm trying this ->
utcdatetime convertedProjectDate = DateTimeUtil::applyTimeZoneOffset(DateTimeUtil::newDateTime(this.ProjectDate,0), DateTimeUtil::getUserPreferredTimeZone());
this.ProjectDate = DateTimeUtil::date(convertedProjectDate);
This is better, but will make it the same as the original issue, which is result '2021-10-26'
I debug this, and in MapEntityToDataSource, the "this.ProjectDate" already with '2021-10-26', so it looks like it is already false at this stage. In the Watch screen, the value become '2021-10-26 08:00:00', so when it looks like "comes in" false :'2021-10-26 00:00:00' then the logic add it by my timezone GMT 8
At which stage I can see the original value from the source ? which supposed to be '2021-10-27 01:00:00 PM' ?
Btw, the "ProjectDate" in that Data Entity is directly map in Dual-Write configuration to my field in Dataverse, which is correct as I insert data 1st time as mentioned.
Thanks