xxxxxxxxxx
in the AppServiceProvider.php you can add the php functionality to alter the timestamp for the whole project
public function boot()
{
Schema::defaultStringLength(191);
date_default_timezone_set('Asia/Aden');
}
xxxxxxxxxx
use Carbon\Carbon;
$timezone = 'America/New_York'; // Replace with the desired timezone
// Get the current date and time
$now = Carbon::now();
// Set the timezone
$now->setTimezone($timezone);
// Output the formatted date and time
echo $now->format('Y-m-d H:i:s');
xxxxxxxxxx
$date = \Carbon\Carbon::createFromFormat('Y-m-d H:i:s',$calc[0]['created_at']);
$date->setTimezone('Asia/Karachi');
$date->format('d M, Y H:i A')