I assumed that, the $Date
variable you have is a Carbon (By default available in Laravel
) object:
$Date->format('Y-m-d H:i:s');
Now to set the timezone
you may use any one of these:
$Date->timezone = new DateTimeZone('Asia/Singapore');
$Date->timezone = 'Asia/Singapore';
$Date->tz = 'Asia/Singapore';
You may also set it from your app/config/app.php
like:
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
*/
'timezone' => 'Asia/Singapore',