How to set timezone in yii2

Published on Author Code Father

Set proper format of timstamp into local time in GridView of yii. When someone is reffering to application property or application config it means “root” config variable, in this case timeZone. Config part:

// in protected/config/main.php
return array(
    'timeZone' => 'Asia/Calcutta'
    // Other configuration....

Hope it will help you.

How to set a dynamic timezone in yii2