I have a MySQL database with a lot of data stored with timestamps all in UTC time.
When a user queries that database, I want them to be able to view the data but in their local timezone.
I'd prefer not to have to calculate an offset each time and change the timestamp with PHP code. Is there any other way?
You can use localtime() function to get the local time and find the matching records from database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With