Mysql Server Timezone vs PHP Server Timezone
Hello. I would like to set mysql server time zone to be the same as PHP Server Zone. Now, I have got user time zone and after that set php server time zone: config(['app.timezone' => $timezone]);
So, that is good. But I tried to set mysql time zone again in config (database), but when I created post and nothing happen. config(['database.connections.mysql.timezone' => "+00:00"]);
For example: Mysql Server Time is EDC. Let the user has registered at 19pm (EDC, mysql time) PHP time zone is set +03:00 (user's time). That's 22pm. So, I would like to set mysql time to be 22pm and the recorded user.created_at to be 22pm too.
I suppose, next approach could be using Carbon. If Mysql Time is EDC then I have to parse every date from EDC to +03:00. Can you give me some tips about the syntax of Carbon query like that? And what's best approach for achieving such a logic?
Please or to participate in this conversation.