Why doesn't today's data come back when I set end_date to today?
end_date is exclusive and a plain date means midnight UTC at the start of that day, so end_date set to today stops before today begins.
end_date is exclusive and a plain date means midnight UTC at the start of that day, so end_date set to today stops before today begins. Today's data then only reaches you later through normal syncing, not from your request.
Set end_date to tomorrow's date. For example, start_date seven days ago and end_date tomorrow puts today inside the window, so it is fetched on that first call and you don't need a schedule of staged retries after a new connection.
A few details:
Dates in
YYYY-MM-DDform are read as00:00UTC. You can also pass a Unix timestamp in seconds.A request with
start_dateequal toend_date, or with noend_date, covers one day fromstart_date.An
end_datein the future is accepted, so tomorrow's date works.The data still has to be in the provider's cloud. If the user's device hasn't synced yet, there is nothing to fetch, so one light retry is reasonable.
Last updated
Was this helpful?