A
A
Alexey2016-12-12 22:33:13
linux
Alexey, 2016-12-12 22:33:13

Why is the wrong time written to the variable?

Good evening.
I am writing some code in php and it contains such a terrible construction:
$current_date = date('Y-m-d H:m:s');
And everything would be fine, if not one but.
a9b663a916a643d5832d02dd48bb8b35.jpg

spoiler
17c7bf5ab5f04c1abae736f10a4eb6d8.jpg

Here you can see what value is written to the variable, what time is now on the server and what time is on my laptop.
I installed the time zone in php.ini at the time of setting up the server (a very long time ago), ntp in CentOs was also configured a long time ago.
I can't figure out what the problem is.
CentOS 6, PHP 7.0.13, Apache 2.2.15, MySQL 5.7.17

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
Wexter, 2016-12-12
@KazinPro

sync laptop time

N
nikola_sa, 2016-12-13
@nikola_sa

In my opinion, the format for minutes is incorrect
i-Minutes with leading zeros

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question