SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    845
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Trying to get my RSS feed to use the correct date format

    Here is the results from my RSS feed evaluation:

    http://validator.w3.org/feed/check.c...com%2Ffeed.rss

    I can't figure out why the code below is not working. Any ideas?

    $postDate = '2012-03-17 00:00:00'

    $postDate = gmdate('%a, %d %b %Y %H \G\M\T', strtotime($postDate) );


    Thanks!
    Convert your dollars into silver coins. www.convert2silver.com

  2. #2
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    2 Thread(s)
    Hi,

    When I run your example above it outputs: %am, %17 %b %2012 %00 GMT

    This does not return an error therefore gmdate() is formatting the date specified in the date converted to a timestamp.

    What do you want to see?

    Steve
    ictus==""

  3. #3
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    845
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I figured it out. I was using mySQL date options instead of php date options. I'm good to go now.
    Convert your dollars into silver coins. www.convert2silver.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •