summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-09-13 17:05:02 -0400
committerEvan Prodromou <evan@status.net>2010-09-13 17:05:02 -0400
commita2fe29388dd1a32a53e01d235471d18e3c4db58b (patch)
treedd723aff9cf884844b8dada391f3dfb825f5ee1e
parent9f4891568f458a8135d59820b47b91e3f89ab93b (diff)
Activity::asString() should format numerical not string time
-rw-r--r--lib/activity.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/activity.php b/lib/activity.php
index 8e2da99bb..606c61432 100644
--- a/lib/activity.php
+++ b/lib/activity.php
@@ -338,7 +338,7 @@ class Activity
$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)) {
@@ -386,5 +386,13 @@ class Activity
{
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');
+ }
}