A
A
Alexander Laikov2019-08-18 02:33:22
Yii
Alexander Laikov, 2019-08-18 02:33:22

Why is there a constant yii2 date in the form?

Good afternoon.
There is in the form a function to create a row in the database.

public function createcomment($id , $text) {
        ....

        var_dump(date('d.m.Y H:m' , time()));die;
        
        ....
    }

The time is constant 02:08 Although half an hour has already passed.
Than it can be caused?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
coderisimo, 2019-08-18
@Florens

Because "m" is the month! ))))))))
PS But less than an hour has passed. In an hour it will be 03:08 ))) For time, use: https://www.php.net/manual/ru/function.date.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question