The "when" HTML fragment is created by the following code snippet from the function qa_post_html_fields() in qa-include/app/format.php:
if (isset($post['created']) && @$options['whenview']) {
$fields['when'] = qa_when_to_html($post['created'], @$options['fulldatedays']);
if ($microdata) {
$gmdate = gmdate('Y-m-d\TH:i:sO', $post['created']);
$fields['when']['data'] = '<time itemprop="dateCreated" datetime="' . $gmdate . '" title="' . $gmdate . '">' . $fields['when']['data'] . '</time>';
}
}
You can change the value either by overriding the function qa_post_html_fields() so that it returns a modified value for $fields['when'], or (in your theme) by overriding the method post_meta_when() so that it renders the exact HTML you need.
Assuming that PHP and the database on your system are configured with the same timezone you could do the following to get the timestamp with the proper timezone:
$tz = date_default_timezone_get();
$dt = new DateTime(strftime("%F %T", $post['raw']['created']), new DateTimeZone($tz));
echo $dt->format('Y-m-d H:i:s P');
If PHP and database are configured with different timezones you need to convert the timestamp from the database timezone to the PHP timezone first:
$db_tz = 'UTC';
$php_tz = date_default_timezone_get();
$dt = new DateTime(strftime("%F %T", $post['raw']['created']), new DateTimeZone($db_tz));
$dt->setTimezone(new DateTimeZone($php_tz));
echo $dt->format('Y-m-d H:i:s P');