I created a QueryExpression with one of the Conditions set to ("dev_lastremarketingtime", ConditionOperator.OlderThanXHours, 1);
The intent is the retrieve multiple records that are an hour after the value of dev_lastremarketingtime.
There are records in the table that meet this criterion, however, they are not returned. When I examine the record (RetrieveMultiple of a specific record this time) it seems that the times used for comparison are not consistent.
For example, when viewing the account record in question, the dev_lastremarketingtime's value as shown on the account form is 5/17/2017 8:57 PM. the internal is time 5/18/2017 12:57:27 AM. The wall clock at the time of the test shows 5/17/2017 10:38:11 PM (or 5/18/2017 2:38:11 AM UTC). This record should have been returned by the query (the current time is more than one hour after the value of dev_lastremarketingtime)
If I wait a few hours and run my app again, the expected records are retrieved.
It seems, therefore, that the Query expression with the ConditionOperator.OlderThanXHours is comparing the current Eastern Daylight time with the record's UTC time.
How can I get this query to compare the same time zones (I don't think it matters which one)?
(My Personal options include the setting for Eastern Time
*This post is locked for comments