<lastmod> date is wrong in sitemap
I'm using v1.5.3.2. I noticed when testing a sitemap for a client, the Last Modified date of her pages was incorrect. A little digging into inc/class-sitemaps.php revealed a few missing parenthesis. This fixed my problem.
$url['mod'] = ( isset( $p->post_modified_gmt ) && $p->post_modified_gmt != '0000-00-00 00:00:00' && $p->post_modified_gmt > $p->post_date_gmt ) ? $p->post_modified_gmt : ( '0000-00-00 00:00:00' != $p->post_date_gmt ) ? $p->post_date_gmt : $p->post_date;
Should be changed to:
$url['mod'] = ( isset( $p->post_modified_gmt ) && $p->post_modified_gmt != '0000-00-00 00:00:00' && $p->post_modified_gmt > $p->post_date_gmt ) ? $p->post_modified_gmt : ( ( '0000-00-00 00:00:00' != $p->post_date_gmt ) ? $p->post_date_gmt : $p->post_date );


I found this same issue when google was showing an error about lastmod on line 41. There is no line 41, and checking inside the files looks fine, but as you can see from the attachment, there is no date for one of the sitemaps.
I attempted the change noted above but does not solve the issue I am having.
I am seeing the same thing. Last Modified date appears to be injecting the Published date instead of the actual last edited date.
The fix that rscs proposed worked for me as well.
I did a comparison against my sitemap before and after v1.5.3.2 and noticed all my dates were wrong as well. Your fix worked for me as well.
I've created pull request #1161 with your suggested fix. Closing this issue in favour of the pull request.