Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7404653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:17:08+00:00 2026-05-29T05:17:08+00:00

The problem seem to be caused with Zend_Feed always changing the publish date to

  • 0

The problem seem to be caused with Zend_Feed always changing the publish date to today’s date/time.

foreach($array['rss']['rows'] as $row) {
    try {
        $pubDate = strtotime($row['from']['value']); 
        $entry = array(
            'title'       => "{$row['title']['value']}",
            'pubDate'    => "{$pubDate}",
            'link'        => "{$url}news/item/{$row['uri']['value']}",
            'description' => "{$row['content']['fvalue']}"
        );

        array_push($this->entries, $entry);
    } catch(Exception $e) {
        throw($e);          
    }
}   

$rss = array(
    'title'   => 'News',
    'link'    => $url,
    'description' => 'Latest News Articles',
    'charset' => 'ISO-8859-1',
    'entries' => $this->entries
);

$feed = Zend_Feed::importArray($rss, 'rss');
$feed->send();

The from value is formatted like this 2012-05-07 00:00:00. When I var_dump the $rss array just before it is passed to the Zend_Feed I get:

array(4) {
  ["title"]=> string(44) "International Horse Trials"
  ["link"]=> string(31) "http://www.horse.co.uk/"
  ["description"]=> string(78) "Location: Wetherby "
  ["pubDate"]=> string(10) "1339023600"
}

I have tried every combination I can think of to get the date to work in different formats.

$pubDate = gmdate(DATE_RFC822, strtotime($row['from']['value']));
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T05:17:09+00:00Added an answer on May 29, 2026 at 5:17 am

    You’re using the wrong variable:

    'lastUpdate' => 'timestamp of the publication date',
    

    http://framework.zend.com/manual/en/zend.feed.importing.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting this error. Problem is that the caused by clause doesnt seem
This problem may seem like school work, but it isn't. At best it is
No foreign keys defined in the database. So I've setup associations. problem: can't seem
I seem to have a problem with this SQL query: SELECT * FROM appts
I seem to remember there is a problem with WITH. I don’t miss it;
I seem to have a problem with getting MVC to fill in my custom
I seem to be having a problem with checking for list equality. In my
I seem to have the exact opposite problem than this question on stopping dock
I seem to have a problem understanding how to conditionally test a boolean value
I seem to be having a problem with my footer growing to 100% width

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.