BUGFIX: More fixes to googlesitemaps from simon_w

This commit is contained in:
sminnee 2008-11-28 03:39:40 +00:00
parent d01188afff
commit 758715c205
1 changed files with 10 additions and 8 deletions

View File

@ -50,8 +50,10 @@ class GoogleSitemap extends Controller {
// The one field that isn't easy to deal with in the template is
// Change frequency, so we set that here.
$properties = $page->toMap();
$created = new SSDatetime($properties['Created']);
$now = new SSDatetime(date('Y-m-d H:i:s'));
$created = new SSDatetime();
$created->value = $properties['Created'];
$now = new SSDatetime();
$now->value = date('Y-m-d H:i:s');
$versions = $properties['Version'];
$timediff = $now->format('U') - $created->format('U');