Change Timezone on parsed RSS file.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • livid86
    New Member
    • Nov 2008
    • 8

    Change Timezone on parsed RSS file.

    Hello Everyone,

    I have used lastRSS to parse through RSS files and i'm able to get the time in this format.

    <pubDate>Sun, 10 May 2009 01:32:28 +0000</pubDate>

    Am i able to change the timezone on this.

    Where i am is +11

    Thanks Alot.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    you want that time expressed in your local timezone?

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Hi.

      Consider this:
      [code=php]<?php
      header("content-type: text/plain");
      date_default_ti mezone_set("Aus tralia/Queensland");

      $inputDate = 'Sun, 10 May 2009 01:32:28 +0000';
      $timestamp = strtotime($inpu tDate);

      echo 'Date in my timezone: ', date('Y-m-d H:i:s', $timestamp);
      // Prints: Date in my timezone: 2009-05-10 11:32:28
      ?>[/code]
      See the List of Supported Timezones to find a timezone suitable for your location.

      Comment

      Working...