symfony - Symfony2 user timezone -
i building symfony2 app user can choose timezone. made neseccary model/form changes store timezone field in user object.
to apply timezone inside specific controller action can use:
$user = $this->get('security.context')->gettoken()->getuser(); date_default_timezone_set( $user->gettimezone() );
is there way without having modify every controller/action?
Comments
Post a Comment