public function getTimeZone()
    {
        try {
            return new \DateTimeZone($this->timezone);
        } catch (\Exception $e) {
            // Default to application time zone if the user hasn't set their time zone
            return new \DateTimeZone(Yii::$app->timeZone);
        }
    }
public function getTimeZone()
    {
        try {
            return new \DateTimeZone($this->timezone);
        } catch (\Exception $e) {
            // Default to application time zone if the user hasn't set their time zone
            return new \DateTimeZone(Yii::$app->timeZone);
        }
    }
public function getTimeZone ( ) { try { return new \ DateTimeZone ( $ this -> timezone ) ; } catch ( \ Exception $ e ) { // Default to application time zone if the user hasn't set their time zone return new \ DateTimeZone ( Yii :: $ app -> timeZone ) ; } }
Get the user's time zone.
Defaults to the application timezone if not specified by the user.
@return \DateTimeZone
Get the user s time zone . Defaults to the application timezone if not specified by the user .