What are the potential pitfalls of storing dates and times in a PostgreSQL database in PHP?

When storing dates and times in a PostgreSQL database in PHP, a potential pitfall is not properly handling timezones. To ensure that dates and times are stored and retrieved accurately across different timezones, it is important to set the timezone in PHP before interacting with the database. This can be done using the `date_default_timezone_set()` function in PHP.

// Set the timezone to UTC before interacting with the database
date_default_timezone_set('UTC');

// Your PostgreSQL database connection code goes here