W
W
WebDev2020-04-12 14:20:36
PHP
WebDev, 2020-04-12 14:20:36

Is it correct to use UTC everywhere on the server?

There are a number of inconveniences in working with time. On the server, the time is one, in MySQL another, in PHP (Laravel) the third. All because of time zones. In addition, periodically, the time also shifts (summer / winter).
At the same time, site visitors are people from different time zones. In general, porridge.
In this regard, I decided to simply set UTC everywhere. Is it correct? Are there any inconveniences? Do they do that?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sanes, 2020-04-12
@Sanes

Correctly. Time zones are best adjusted in the final application.
I set UTC everywhere, except for the application. That turned out to be easier.
Timezone on edited format in Laravel model?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question