php - Format Timezone for Carbon Date

Mots clés : phplaraveltimezonelaravel-5php-carbonphp

meilleur 3 Réponses php - Format Timezone for Carbon Date

vote vote

91

$timestamp = '2014-02-06 16:34:00'; $date = Carbon::createFromFormat('Y-m-d H:i:s', $timestamp, 'Europe/Stockholm'); $date->setTimezone('UTC'); 
vote vote

87

$date->setTimezone('Asia/Phnom_Penh'); 
vote vote

80

Carbon::now()->timezone('Europe/Stockholm') 

Questions similaires