php - Setting timzone at global level after user login -
my application has users various timezones. i've set settings page user can save timezone preference.
the problem
i've login controller in i'm fetching logged in user's timezone value , setting using:
date_default_timezone_set('europe/berlin'); // value pulled database
but redirect "login" controller "dashboard" controller, timezone being set original default value of america/chicago
.
i verified using
date_default_timezone_get(); // prints "america/chicago"
so should put timezone setting code effects entire application?
ps: know index.php
file or config.php
file choice @ places, won't have user's timezone value retrieved database.
Comments
Post a Comment