What are some common mistakes to avoid when trying to output custom dates in PHP?

One common mistake when outputting custom dates in PHP is not using the correct format characters for date manipulation. To avoid this, make sure to use the appropriate format characters such as 'Y' for year, 'm' for month, 'd' for day, 'H' for hour, 'i' for minute, and 's' for second. Additionally, ensure that you are using the correct syntax for formatting the date string.

// Correct way to output custom date in PHP
$date = date('Y-m-d H:i:s');
echo $date;