I have a tricky problem. I have written 3 Apex batch/scheduling jobs, one for North America, European Union, and Asian Pacific. Each job runs the following SOQL query to get any Asset records that were installed "Today" in that region:
Select id from Asset where InstallDate = TODAY
The problem I am having is with the TODAY date literal. I have confirmed that it takes the context of the user who schedules/runs the batch job. Ie, when the job is scheduled by me, a North America user, the TODAY variable is in PST (Pacific Standard Time).
To have the query return the correct results, we would have to create fake users for EU and APAC (NA would work fine) to schedule the jobs with. We dont want to waste 2 Salesforce licenses, but cant think of another solution. Very open to clever ideas, thanks.