Open KomalJha01 opened 5 days ago
Thanks for the PDF. I will take a look!
@KomalJha01 can you clarify on the following sentence:
we replaced the usage of
Datetime.newInstance()
withDatetime.newInstanceGMT()
Is that in your own code, or within Apex Rollup? Not all date literals use GMT when calculating date boundaries (see the docs on this):
Each date literal represents a range of time relative to the current day. The exact start and stop of the range depends on the date literal and the locale of the user sending the query.
Thanks!
This is my own code.
Yes but when are calculating the range of date value within the boundaries then
dateVal > this.bound.dateGmt() && dateVal > this.ref.dateGmt();
And then .dateGMT() gives the time shift issue results in the wrong calculation.
Got it! I will get this fixed - I've had limited time this week but hoping to be able to dedicate a few hours tomorrow
Thanks!! @jamessimone
I've attached a PDF that explains that boundary cases of date are not handled correctly. In my case, I want to calculate the Amount (Ask_Amount__c is the lookup on contact) on the contact which is N_YEARS_AGO so when I'm taking the boundary values of dates then It does not give the correct amount.
Further details are explained in the pdf.
_Miscalculation of Date Boundary due to Time Zone Differences (1).pdf