|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r56205 - website/public_html/beta/common/code
From: daniel_james_at_[hidden]
Date: 2009-09-15 02:59:03
Author: danieljames
Date: 2009-09-15 02:59:02 EDT (Tue, 15 Sep 2009)
New Revision: 56205
URL: http://svn.boost.org/trac/boost/changeset/56205
Log:
Use GMT when parsing feeds.
Text files modified:
website/public_html/beta/common/code/boost_feed.php | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
Modified: website/public_html/beta/common/code/boost_feed.php
==============================================================================
--- website/public_html/beta/common/code/boost_feed.php (original)
+++ website/public_html/beta/common/code/boost_feed.php 2009-09-15 02:59:02 EDT (Tue, 15 Sep 2009)
@@ -53,20 +53,11 @@
switch (strtolower($val['tag']))
{
case 'pubdate':
- $item['pubdate'] = strtotime($item['pubdate']);
- if ($item['pubdate'] != 0)
- {
- $item['date'] = gmdate('F jS, Y H:i ',$item['pubdate']).'GMT';
- }
- else
- {
- $item['pubdate'] = time();
- $item['date'] = "In Progress";
- }
- break;
-
case 'dc:date':
- $item['pubdate'] = strtotime($item['dc:date']);
+ $old_tz = date_default_timezone_get();
+ date_default_timezone_set('GMT');
+ $item['pubdate'] = strtotime($item[strtolower($val['tag'])]);
+ date_default_timezone_set($old_tz);
if ($item['pubdate'] != 0)
{
$item['date'] = gmdate('F jS, Y H:i ',$item['pubdate']).'GMT';
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk