protected function modifierDate($input)
    {
        if (empty($input)) return NULL;
        //if ($input == '0000-00-00 00:00:00') return NULL;

        if ($input instanceof \DateTime) return $input;

        try {
            $output = new \DateTime($input);
            $output->setTimeZone(new \DateTimeZone('America/New_York'));

            return $output;
        } catch (\Exception $exception) {
            if (!empty($this->log)) $this->log->error('Failed to convert \DateTime object from string "' . $input . '"', $exception);
        }

        return NULL;
    }
protected function modifierDate($input)
    {
        if (empty($input)) return NULL;
        //if ($input == '0000-00-00 00:00:00') return NULL;

        if ($input instanceof \DateTime) return $input;

        try {
            $output = new \DateTime($input);
            $output->setTimeZone(new \DateTimeZone('America/New_York'));

            return $output;
        } catch (\Exception $exception) {
            if (!empty($this->log)) $this->log->error('Failed to convert \DateTime object from string "' . $input . '"', $exception);
        }

        return NULL;
    }
protected function modifierDate ( $ input ) { if ( empty ( $ input ) ) return NULL ; //if ($input == '0000-00-00 00:00:00') return NULL; if ( $ input instanceof \ DateTime ) return $ input ; try { $ output = new \ DateTime ( $ input ) ; $ output -> setTimeZone ( new \ DateTimeZone ( 'America/New_York' ) ) ; return $ output ; } catch ( \ Exception $ exception ) { if ( ! empty ( $ this -> log ) ) $ this -> log -> error ( 'Failed to convert \DateTime object from string "' . $ input . '"' , $ exception ) ; } return NULL ; }
Return a date time modified input

@param string $input
@return \DateTime|NULL
Return a date time modified input