How to properly set "0000-00-00 00:00:00" as a DateTime in PHP
PHP Snippet 1:
$entEmail = new Email();
$entEmail->setViewedAt(null);
PHP Snippet 2:
$Date = date('Y-m-d H:i:s');
PHP Snippet 3:
date_default_timezone_set('America/New_York');
$date = date('Y-m-d H:i:s');
$entEmail = new Email();
$entEmail->setViewedAt( $date );
PHP Snippet 4:
date_default_timezone_set('America/New_York');
$entEmail = new Email();
$entEmail->setViewedAt( date('Y-m-d H:i:s') );