<?php
$date = new DateTime('2000-01-01');
echo $date->format('Y-m-d H:i:s');
?>
See the PHP date() function for date format references.
<?php
$today = new DateTime("now", new DateTimeZone('Asia/Manila'));
var_dump( $today );
?>
<?php
date_default_timezone_set('Asia/Manila');
?>
<?php
// The date
date_default_timezone_set('UTC');
$plain_date = date('Y-m-d H:i:s');
/**
* or... alternatively set it using a string value
$plain_date = '2020-01-01 00:00:00';
*/
// Prepare the timezones
$utc = new DateTimeZone('+0000');
$ph = new DateTimeZone('+0800');
// Conversion procedure
$datetime = new DateTime( $plain_date, $utc ); // UTC timezone
$datetime->setTimezone( $ph ); // Philippines timezone
echo $datetime->format('Y-m-d H:i:s');
?>
$month = 3;
(\DateTime::createFromFormat('!m', $month))->format('F'); \\ March
PHP, DateTime class, URL: https://www.php.net/manual/en/datetime.format.php