For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > August 2006 > RSS and PHP question concerning date, time, timezones, relation to GMT, ...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RSS and PHP question concerning date, time, timezones, relation to GMT, ...
Pugi!

2006-08-14, 7:57 am

I live in central european timezone and currently we are GMT +0200.
I have my own (valid) RSS. The data is stored in database and my RRS feed is
in fact a php page that retrieves the information from the database.
Concerning the lastbuilddate and pubdate. I enter the time (=pubdate) as a
local date/time (CET), the webserver is in the same timezone. But wether I
use
$pubdate = date("D, d M Y H:i:s O", strtotime($row->pubdate));
or
$pubdate = date("D, d M Y H:i:s", strtotime($row->pubdate));
feedreaders like RSSOwl and FeedReader show the same date and time
regardless of the 'O'.

Question 1: the date/time in "D, d M Y H:i:s O", for example "Mon, 14 Aug
2006 15:32:30 +0200" What does it exactly mean ? Is it 15:32:30 GMT plus 2
hours equaling 17:32:30 CET ? Or is it 15:32:30 CET with 2 hours difference
to GMT, equaling 13:32:30 GMT ?

Question 2 : Do feed readers only look at the date/time and ignore the
difference to GMT ?

Question3: Is this important enough to bother ? For me not, but I can
imagine that for a newssite or stock exchange feed the exact date and time
of publication can be very important.

thanx,

Pugi!


ZeldorBlat

2006-08-14, 6:56 pm


Pugi! wrote:
> I live in central european timezone and currently we are GMT +0200.
> I have my own (valid) RSS. The data is stored in database and my RRS feed is
> in fact a php page that retrieves the information from the database.
> Concerning the lastbuilddate and pubdate. I enter the time (=pubdate) as a
> local date/time (CET), the webserver is in the same timezone. But wether I
> use
> $pubdate = date("D, d M Y H:i:s O", strtotime($row->pubdate));
> or
> $pubdate = date("D, d M Y H:i:s", strtotime($row->pubdate));
> feedreaders like RSSOwl and FeedReader show the same date and time
> regardless of the 'O'.
>
> Question 1: the date/time in "D, d M Y H:i:s O", for example "Mon, 14 Aug
> 2006 15:32:30 +0200" What does it exactly mean ? Is it 15:32:30 GMT plus 2
> hours equaling 17:32:30 CET ? Or is it 15:32:30 CET with 2 hours difference
> to GMT, equaling 13:32:30 GMT ?


It's 15:32:30 CET. In CET there is a 2 hour difference to GMT, so it's
13:32 GMT.

>
> Question 2 : Do feed readers only look at the date/time and ignore the
> difference to GMT ?


Depends on the feed reader.

>
> Question3: Is this important enough to bother ? For me not, but I can
> imagine that for a newssite or stock exchange feed the exact date and time
> of publication can be very important.


You answered your own question. If it's important to the data your
feeding then yes, otherwise, no.

>
> thanx,
>
> Pugi!


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com