What are some potential pitfalls when trying to display server time using PHP?

One potential pitfall when trying to display server time using PHP is not setting the correct timezone, which can result in inaccurate time displays. To solve this issue, you can set the timezone using the `date_default_timezone_set()` function in PHP before displaying the server time.

<?php
date_default_timezone_set('America/New_York');
echo "Server time is: " . date('Y-m-d H:i:s');
?>