Datetime retrieved from db is 7 hours off?
Date/times are generally stored in the database as UTC, so if your timezone is UTC -7 hours then all your times will be out by 7 hours (between the database and your expected output).

When you load a date from the database you then have to apply the desired timezone before displaying it or doing calculations on it or whatever.

For some examples you can see what the date module does with:
date_formatter_process() and
date_tokens()

It creates a new DateObject and then runs date_timezone_set($date, timezone_open($timezone)); on that date to set the timezone.

If you just want to use the site timezone (or user selected timezone) you can use date_default_timezone().

There is also the drupal core function format_date(), which takes a timestamp, a date format, and a timezone and gives you the output date.
That would be the easiest option.

For example, you might do this:

$okdate = format_date($nttdate, 'medium', '', date_default_timezone());