I am using Laravel, and I have set the timezone "UTC" in the config/app.php file but I want to do the calculation in the "America/New York" timezone but if I use date_default_timezone_set() in any function then its scope will be for that particular function or it will be set for global scope
For e.g.
function xyz(){
date_default_timezone_set("America/New York");
}
If I set the date_default_timezone_set("America/New York"); inside this function, it's scope inside this function or globally for the whole application, if it's scope for whole the application how to make this scope inside the function only
Thanks