summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-08-03 15:55:40 -0700
committerEvan Prodromou <evan@status.net>2010-08-03 15:55:40 -0700
commitcc71f1ae826cc7c186f38ac902d963dc8f65caeb (patch)
tree84a5da166fa52806f43553348e065504f540651a /classes/Notice.php
parentf83171824f835ff9cd24bf0aea26f13c62b806cf (diff)
output Atom dates in UTC
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 61844d487..b849225fd 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -1242,7 +1242,7 @@ class Notice extends Memcached_DataObject
$notice = $profile->getCurrentNotice();
if (!empty($notice)) {
- $xs->element('updated', null, common_date_w3dtf($notice->created));
+ $xs->element('updated', null, self::utcDate($notice->created));
}
$user = User::staticGet('id', $profile->id);
@@ -1307,7 +1307,7 @@ class Notice extends Memcached_DataObject
Event::handle('EndActivityId', array(&$this, &$xs, $id));
}
- $published = common_date_w3dtf($this->created);
+ $published = self::utcDate($this->created);
if (Event::handle('StartActivityPublished', array(&$this, &$xs, &$published))) {
$xs->element('published', null, $published);
@@ -2055,4 +2055,11 @@ class Notice extends Memcached_DataObject
$tag->free();
return $tags;
}
+
+ static private function utcDate($dt)
+ {
+ $dateStr = date('d F Y H:i:s', strtotime($dt));
+ $d = new DateTime($dateStr, new DateTimeZone('UTC'));
+ return $d->format(DATE_W3C);
+ }
}