Answers for "laravel timezone utc-4"

PHP
0

carbon change date timezone from one to utc

Carbon::createFromFormat('Y-m-d H:i:s', $some_date, 'UTC')
    ->setTimezone('America/Los_Angeles')
    
// First, you set the timezone you initially have, 
// so if you store your date in the database as UTC, 
// then set the default timezone to UTC, 
// then use ->setTimeZone('Valid/Timezone') 
// to make the change from what you'v had to the new timezone.
Posted by: Guest on November-11-2021
1

laravel timezone

Inside env
add DB config
DB_TIMEZONE=+08:00
Posted by: Guest on September-29-2020

Code answers related to "laravel timezone utc-4"

Browse Popular Code Answers by Language