Why are these two things showing different times?
select CONVERT_TZ('2023-05-03 00:00:00', '-06:00', @@global.time_zone);
Outputs:
2023-05-03 06:00:00
$date = new \DateTime('2023-05-03 00:00:00', new \DateTimeZone('America/Chicago'));
$date->setTimezone(new \DateTimeZone('UTC'));
echo $date->format('Y-m-d H:i:s');
Outputs:
2023-05-03 05:00:00
-06:00 is America/Chicago. So why there is a difference of 1 hour? Can any one guide me to the correct way please?