frontend/controllers/UserController.php
/**
     * For set dynamic timezone for user
     * @return string (json)
     */
For set dynamic timezone for user
@return string (json)
For set dynamic timezone for user @return string ( json )
public function actionSetTimezoneOffset()
    {
        Yii::$app->response->format = Response::FORMAT_JSON;
        $model = new SetTimeZoneOffsetForm();
        if ($model->load(['SetTimeZoneOffsetForm' => $_GET], 'SetTimeZoneOffsetForm') && $model->validate()) {
            $ret = $model->setDynamicTimeZone(Users::findIdentity($this->User->user_id));
            return ['status' => $ret];
        }
        return [
            'status' => false,
            'debug'  => $model->getErrors(),
        ];
    }
public function actionSetTimezoneOffset ( ) { Yii :: $ app -> response -> format = Response :: FORMAT_JSON ; $ model = new SetTimeZoneOffsetForm ( ) ; if ( $ model -> load ( [ 'SetTimeZoneOffsetForm' => $ _GET ] , 'SetTimeZoneOffsetForm' ) && $ model -> validate ( ) ) { $ ret = $ model -> setDynamicTimeZone ( Users :: findIdentity ( $ this -> User -> user_id ) ) ; return [ 'status' => $ ret ] ; } return [ 'status' => false , 'debug' => $ model -> getErrors ( ) , ] ; }
For set dynamic timezone for user
 @return string (json)
For set dynamic timezone for user @return string ( json )