Answer the question
In order to leave comments, you need to log in
How to change the locale in a project?
My database stores dates in timestamp with time zone format (eg 2017-07-30 21:00:00.000000 +03:00). Accordingly, I see this date everywhere in my place as 21:00:00 07/30/2017, which completely suits me. But when I uploaded my site to the battle, this date began to look like 07/30/2017 19:00:00 (the London time zone set on the server was applied). How to set a single time zone from a project, ignoring the choice that php and db make? In order not to hang the formatter on each date call yet. I set 'timeZone' => 'Europe/Moscow' in the config, I thought it would automatically work for the entire project, but it didn't help.
Answer the question
In order to leave comments, you need to log in
To make them look the same everywhere, bring them to the same denominator, for example, to UTC + 0.
In general, take note.
All timezone-aware dates and times are stored internally in UTC. They are converted to local time in the zone specified by the TimeZone configuration parameter before being displayed to the client.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question