Select from mysql by day with different timezones (php)
- by Adam
I'm storing leads in a database, and each lead has a datetime field with a PST timezone based date & time.
I want my user to be able to display all leads from a certain date (e.g. today, yseterday), and choose the timezone.
E.g. if I want to see all leads that were generated yesterday in EST timezone, I need to first convert (or read) all the datetime values to EST, and then only select those who are in the right range (yesterday).
What would be the best way to do that?