H
H
hollanditkzn2017-03-20 10:30:42
Yii
hollanditkzn, 2017-03-20 10:30:42

How to make the correct time format?

I have 17:00:00 in my database
In gridView I used

[
                'attribute' => 'minut',
                'format' => ['date', 'php:H:i']
            ],

And I get 20:00

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2017-03-20
@hollanditkzn

Yii converts the date/time according to the set timezone , to solve the problem, change the timezone.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question