$xs->element('id', null, $this->id);
$xs->element('title', null, $this->title);
- $xs->element('published', null, common_date_iso8601($this->time));
+ $xs->element('published', null, self::iso8601Date($this->time));
$xs->element('content', array('type' => 'html'), $this->content);
if (!empty($this->summary)) {
{
return ActivityUtils::child($element, $tag, $namespace);
}
+
+ static function iso8601Date($tm)
+ {
+ $dateStr = date('d F Y H:i:s', $tm);
+ $d = new DateTime($dateStr, new DateTimeZone('UTC'));
+ $d->setTimezone(new DateTimeZone(common_timezone()));
+ return $d->format('c');
+ }
}