Format Timezone for Carbon Date

I think you should refer to the official php timezone list. In your case you can use

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

for UTC+7:00.


You can change the timezone with this:

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

this format working fine to my Local(Ubuntu) and prod(Redhat) project.


For people wondering, you can chain the timezone like so:

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