If my user says they’re available for the next 4 Mondays, I create four schedule records in my database. I calculate the date of the first Monday, then add 1 week for the second record, add 1 week for the third record, and add 1 week for the fourth record:
Any time they add dates to their “usual” schedule, I always check first to make sure there isn’t already a corresponding record before creating the weekly records. I query all existing records by calculating the first date, then adding 7 days for the second record, then adding 7 days for the third record, etc.
In my testing, this was working great…until November 7, 2021 which happens to be Daylight Savings. So I gather that the filter
transform_timestamp takes daylight savings into account when creating a record, but the query filter
timestamp_add_days does not take daylight savings into account when looking for a record.
Is there a way for me to manipulate timestamps in queries in a daylight-savings-compliant way?