In Yii2 how to get a date and time in PHP without using JavaScript?

In Yii2 use a DateTimePicker widget from Kartik, give the date and time user:
'options'=>['value' => date("d.m.Y H:i:s")]
As I understand it, get server time, which is behind my time for 1 hour...

How to get current time and date of user's computer without using JavaScript? Help ID please.
June 14th 19 at 18:28
4 answers
June 14th 19 at 18:30
On the server it is better to work with a single time zone of server (preferably UTC), and all the formatting and transfer time to the desired time zone, do it on the client. I usually keep these goals somewhere in the global scope JS-script constant that stores the offset of the time zone of the user relative to UTC and this constant is used wherever there is a withdrawal date/time.
June 14th 19 at 18:32
How to get current time and date of user's computer without using JavaScript?

No way. PHP server-side language, and it is irrelevant to what is happening on the client machine does not have. To work with client car and there is JavaScript. What is the problem to use it?
Don't know how to use JS for the time - murphy_Hickle commented on June 14th 19 at 18:35
June 14th 19 at 18:34
Good morning.
As I understand it, get server time, which is behind my time for 1 hour...

Configure in the configuration file time zone and all will be well.
How to work with date and time in js.
June 14th 19 at 18:36
At the IP client, you can learn timzone

Find more questions by tags PHPYii