Php, why does he keep adding 2 minutes?

When he pulled out of db, it looks like this: 2010-02-28 10:00:00

I format it (yes, I know that it’s better to just do it in the request, but I don’t have this option right now):

date('l F d, Y h:m A', strtotime($row['start']));

But, in spite of everything, it is displayed as follows: Sunday, February 28, 2010 10:02

Any idea why she adds these two minutes?

+3
source share
2 answers

min date means the number of the month, not minutes. What you are looking for i. For instance:

date('l F d, Y h:i A', strtotime($row['start']));

You really have to check out the docs here .

, , , , , .

+13

, m - , 02 - .

+1

Source: https://habr.com/ru/post/1733577/


All Articles