Determine a user's current local time based on their country ISO code in PHP and MySQL

I'm using a CRON task to run a PHP script that sends emails in the afternoon according to the recipients' local time determined by their country's ISO code.

I don't store dates in UTC, so I can only determine the time zone from the ISO code of my user's country.

My server is configured on the time zone of France (UTC+0200).

How do I select users whose local time is currently afternoon?

MySQL users table
    
+

Answer

--+

Answer

-+

Answer

Answer

-+

Answer

Answer

-+ | company | Country | Email | Date | +

Answer

--+

Answer

-+

Answer

Answer

-+

Answer

Answer

-+ | ABC | US | john.doe@domain.com | 2018-08-19 12:53:58 | | DEF | FR | doe.john@domain.com | 2021-10-04 08:12:27 | | GHJ | CN | john.d@domain.com | 2022-03-15 17:32:19 | +

Answer

--+

Answer

-+

Answer

Answer

-+

Answer

Answer

-+

Source