Re: [PHP] [RFC] HTTP timezone

2007-06-11 Thread Richard Lynch
On Mon, June 11, 2007 9:05 am, Stefanos Harhalakis wrote:
>   There is no need to include the DST information since when on DST
> the client
> will be sending the propper offset. For example, EET+2EEST is +0200
> during
> winter and +0300 during DST.

I think you are over-simplifying things too much...

I do not believe that users will be sending the correct offset during
DST.

Especially not during the actual change-over time/day.

And, of course, users living in/near areas that don't use DST will
probably have issues.

And you can just about write off any laptop users who travel.

I don't reset my clock on my laptop as I travel through each timezone,
or even if I'm staying somewhere for anything less than a couple
weeks.

So your server-side will be converting to a date-time which is pretty
irrelevant, really.

>   Hope this clears things a bit...
>
>   By the way, what makes you think that most people have an invalid
> timezone
> configured? Windows XP have NTP support that is enabled by default.

It's not that MOST people have improper timezone.

It's that ENOUGH people have improper timezone (and clock as well)
that you'll not be able to make this useful.

Now if you wanna write an RFC to just do away with DST completely,
sign me up! :-)

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-11 Thread Lester Caine

Stefanos Harhalakis wrote:

On Monday 11 June 2007 18:15, Lester Caine wrote:

calender of events over a change in daylight saving I NEED to know !!!


  I believe that I finally understand your thoughts. You mean that you need to 
use the timezone information to know when in the future the time will change 
(or in the past). I believe that you're correct.


That is the one exactly - and I've had great trouble getting people to accept 
that there IS a problem. The main problem happens where events actually change 
day because of the daylight saving changes - as you say in the past or future.


  I assume that providing the current offset and the timezone as two separate 
strings would be the most appropriate thing. The offset will provide 
simplicity for simple applications. The timezone will provide full 
information for applications that support it and the browser will not need to 
do much work since both of them are immediately available (Just a sprintf()).


  What about something like:

Timezone: offset; posix_timezone

for example:

Timezone: +0200; EET-2EEST


Provided that the posix element actually defines a distinct daylight saving 
variation then it would work. The tz database does seem to have all current 
information?



Correct, so people select the timezone that gives the right time, if the
daylight saving switch is off. And then the calendar gives the wrong times
when trying to display a weekend containing a daylight saving change. (
THAT one wasted a few hours before we twigged what was wrong - since the
clock was right :) )


  Your comments are of great importance to this attempt. I'll be glad if we 
can come with a solution that will fit your experienced needs on this 
subject. This may help other people too.


Basically we had to drop using the browser time offset so that people were 
forced to set their correct offset - including daylight saving. The new 
date/time facilities provided in PHP5 actually allow accurate calendars to be 
built since daylight saving started, and hopefully this information will track 
all future changes, but none of it will work unless you have the users 
daylight saving information, just having a simple time offset would not allow 
you to create a correct calendar.


I had fun last October trying to debug a calendar package until I realised 
that daylight saving was being applied twice, so as long as people are AWARE 
that it is important in some countries 


--
Lester Caine - G8HFL
-
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Firebird Foundation Inc. - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-11 Thread Stefanos Harhalakis
On Monday 11 June 2007 18:15, Lester Caine wrote:
> calender of events over a change in daylight saving I NEED to know !!!

  I believe that I finally understand your thoughts. You mean that you need to 
use the timezone information to know when in the future the time will change 
(or in the past). I believe that you're correct.

  I assume that providing the current offset and the timezone as two separate 
strings would be the most appropriate thing. The offset will provide 
simplicity for simple applications. The timezone will provide full 
information for applications that support it and the browser will not need to 
do much work since both of them are immediately available (Just a sprintf()).

  What about something like:

Timezone: offset; posix_timezone

for example:

Timezone: +0200; EET-2EEST

?

> Correct, so people select the timezone that gives the right time, if the
> daylight saving switch is off. And then the calendar gives the wrong times
> when trying to display a weekend containing a daylight saving change. (
> THAT one wasted a few hours before we twigged what was wrong - since the
> clock was right :) )

  Your comments are of great importance to this attempt. I'll be glad if we 
can come with a solution that will fit your experienced needs on this 
subject. This may help other people too.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-11 Thread Tijnema

On 6/11/07, Stefanos Harhalakis <[EMAIL PROTECTED]> wrote:

On Monday 11 June 2007 16:05, Lester Caine wrote:



 By the way, what makes you think that most people have an invalid timezone
configured? Windows XP have NTP support that is enabled by default. Without a
proper timezone this should result in an always invalid time. Linux and BSD
systems have more experienced users that set their timezone correctly most of
the time.


Like if the NTP works :P, when I go to the settings I see that my time
was last synchronised on the date I installed XP, and when I try to
run it manually, both servers fail to update. While i have a 24/7
Internet connection :)
This is the same for all my XPSP2/XPMCE installations. And what does
make you think that most people have correct time? On my school there
are about 20 computers in one place, and I checked the time for all of
them, all different, all wrong!
For my computers at home, I do have the correct Time, but Incorrect
time zone... (except 1 :P)
So, the information send to the server in the header would be wrong
for all PCs here in my LAN and at school, better said, 100% of the
computers I use pass wrong information, and so how reliable would that
header be?

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-11 Thread Lester Caine

Stefanos Harhalakis wrote:

On Monday 11 June 2007 16:05, Lester Caine wrote:


  Hope this clears things a bit... 


As I actually USE a clients time offset, I know what the problem is. The DATA 
is ALL stored as UTC time data, so it does not matter who enters it. It will 
be stored without a time offset.
When building a calender of events, I need to know the clients daylight saving 
time - since it is not available in the browser we have to handle it manually 
anyway so the browser feed is always a waste of time since it simply does not 
give you any USEFUL information. If I am building a calender of events over a 
change in daylight saving I NEED to know !!!
Now it would be possible to ignore time zone and daylight saving when storing 
data, but THAT becomes an even worse mess when trying to manage meetings 
across Europe. They can all be at 9AM but not happening at the same time as 
you have to track the daylight saving at each location :)


  By the way, what makes you think that most people have an invalid timezone 
configured? Windows XP have NTP support that is enabled by default. Without a 
proper timezone this should result in an always invalid time. Linux and BSD 
systems have more experienced users that set their timezone correctly most of 
the time.


Correct, so people select the timezone that gives the right time, if the 
daylight saving switch is off. And then the calendar gives the wrong times 
when trying to display a weekend containing a daylight saving change. ( THAT 
one wasted a few hours before we twigged what was wrong - since the clock was 
right :) )


--
Lester Caine - G8HFL
-
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Firebird Foundation Inc. - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-11 Thread Stefanos Harhalakis
On Monday 11 June 2007 16:05, Lester Caine wrote:
> Timezone information is only of use for the CURRENT day - even if it is
> wrong. It is ESSENTIAL that any changes also include the daylight saving
> information. Since this is not included, all current sites handling event
> related information in real time need to manually log a users PROPER time
> and daylight saving information so that they know if 8AM today is the same
> as 8AM tomorrow.

  Since HTTP is a query and response protocol, timezone information will be 
sent on each query. Lets say that it is XX of month Y 1:59 and that the 
timeoffset is changed at '2:00' by +1. A request  sent at 1:59 will have an 
offset, lets say +0200. A request sent at 3:00 (that's one minute after 1:59) 
will have an offset of +0300. 

  Full timezone information requires a POSIX 1003.1 timezone string that is 
quite complex to parse and support, since the server side script must be able 
to identify all of the available timezones. The first draft proposed this 
representation but was changed after the suggestions of ietf-http-wg mailing 
list people to only include the offset for simplicity.

  Timezone information is not meant to be stored as session information nor 
being used for anything else than one-time time/date representation. It is 
just a way for the client to say: If you're going to show me something that 
is time related then you should know that you should represent it using this 
offset from GMT. Something like the Accepted-Language header.

  Lets say you're viewing an MRTG generated graph. This graph uses the time as 
the X-axis value. Lets say that the server is in Greece where the offset is 
+0200 (+0300 during DST) and that the time is 14:10. The graph will end its X 
axis at the current time (14:10). Someone from the UK visits the graph page 
and he should see the same graph ending in 12:10 (UK is +). An incorrect 
timezone string will only result in 'bad' time representation which will be 
the case anyway (without TZ).

  There is no need to include the DST information since when on DST the client 
will be sending the propper offset. For example, EET+2EEST is +0200 during 
winter and +0300 during DST.

  Hope this clears things a bit... 

  By the way, what makes you think that most people have an invalid timezone 
configured? Windows XP have NTP support that is enabled by default. Without a 
proper timezone this should result in an always invalid time. Linux and BSD 
systems have more experienced users that set their timezone correctly most of 
the time.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-11 Thread Lester Caine

Stefanos Harhalakis wrote:

On Sunday 10 June 2007, Richard Lynch wrote:

On Sat, June 9, 2007 8:06 am, Stefanos Harhalakis wrote:

Timezone: +0200

that will specify their timezone offset. This way scripts will be able
to
provide appropriate date/time strings/representations and/or content.

It's pretty useless and unreliable since user's clocks/timezone
settings are incorrect far too often...


I'm only considering the timezone information. I believe that this is not the 
proper way to think before making a start. The fact that many user's timezone 
is incorrect doesn't mean that this is not needed. Lets just hope that one 
day Windows will do the right thing and keep the time in UTC while displaying 
it using the appropriate timezone.


Timezone information is only of use for the CURRENT day - even if it is wrong. 
It is ESSENTIAL that any changes also include the daylight saving information. 
Since this is not included, all current sites handling event related 
information in real time need to manually log a users PROPER time and daylight 
saving information so that they know if 8AM today is the same as 8AM tomorrow.


If this is not going to actually fix the problem - don't bother wasting time 
on it :)


--
Lester Caine - G8HFL
-
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Firebird Foundation Inc. - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-10 Thread Tijnema

On 6/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

I agree with Tijnema he's hit the nail on the head. And the inability to handle 
daylight time really is a big potential snag - who in North America isn't on 
daylight time at some point in the year?  If the timezone data is unreliable 
then no thinking developer will use it. The question then becomes: As a 
developer why WOULD you use unreliable timezone data?

Sincerely,
Rob


Yes, I think that you can compare it with the Referrer header, it's
unreliable too, and which developer uses it these days?

Tijnema


>
> On 6/10/07, Stefanos Harhalakis <[EMAIL PROTECTED]> wrote:
> > On Sunday 10 June 2007, Tijnema wrote:
> > > To get back to the point, I think that the timezone should be defined
> > > on what time it actually is at his PC, and what time it is on
> > > time.nist.gov for example, and not lookng at some setting... Timezone
> > > setting is often wrong, people just update their time to match the
> > > time of their watch. This sets the UTC time wrong too, but still
> > > displays the right time to the user. So if you compare this time to
> > > time on web servers that are allways right, and you compare the
> > > difference between that, then you know the timezone that is probably
> > > right.
> >
> >  Timezone is a property of the user and some times of the session. It is not
> > a property of a system. Different users of a system may use different
> > timezones (unless they use Windows where they can't).
> >
> >  Anyway, I strongly believe that the issue of providing the correct timezone
> > should be a concern of the end user and the browser. Any error checking and
> > workarounds should be performed by those two and not by the server side
> > scripts.
> >
> >  In any way, there is no guarantee that the timezone information provided by
> > clients will be correct. That's why it should only be used for informational
> > purposes and not for security etc.
>
> Sure, but if this setting will be incorrect for 90-95% of the time,
> then there won't be a lot people that are actually gonna use it,
> because why do we want to know information that is probably wrong?
>
> Tijnema
>
>





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-10 Thread info
I agree with Tijnema he's hit the nail on the head. And the inability to handle 
daylight time really is a big potential snag - who in North America isn't on 
daylight time at some point in the year?  If the timezone data is unreliable 
then no thinking developer will use it. The question then becomes: As a 
developer why WOULD you use unreliable timezone data?

Sincerely,
Rob

// Flag images, ISO codes & PHP scripts for MySql Country data field
// http://www.globalissa.com/demos/countries/about/index.php

> 
> On 6/10/07, Stefanos Harhalakis <[EMAIL PROTECTED]> wrote:
> > On Sunday 10 June 2007, Tijnema wrote:
> > > To get back to the point, I think that the timezone should be defined
> > > on what time it actually is at his PC, and what time it is on
> > > time.nist.gov for example, and not lookng at some setting... Timezone
> > > setting is often wrong, people just update their time to match the
> > > time of their watch. This sets the UTC time wrong too, but still
> > > displays the right time to the user. So if you compare this time to
> > > time on web servers that are allways right, and you compare the
> > > difference between that, then you know the timezone that is probably
> > > right.
> >
> >  Timezone is a property of the user and some times of the session. It is not
> > a property of a system. Different users of a system may use different
> > timezones (unless they use Windows where they can't).
> >
> >  Anyway, I strongly believe that the issue of providing the correct timezone
> > should be a concern of the end user and the browser. Any error checking and
> > workarounds should be performed by those two and not by the server side
> > scripts.
> >
> >  In any way, there is no guarantee that the timezone information provided by
> > clients will be correct. That's why it should only be used for informational
> > purposes and not for security etc.
> 
> Sure, but if this setting will be incorrect for 90-95% of the time,
> then there won't be a lot people that are actually gonna use it,
> because why do we want to know information that is probably wrong?
> 
> Tijnema
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-10 Thread Tijnema

On 6/10/07, Stefanos Harhalakis <[EMAIL PROTECTED]> wrote:

On Sunday 10 June 2007, Tijnema wrote:
> To get back to the point, I think that the timezone should be defined
> on what time it actually is at his PC, and what time it is on
> time.nist.gov for example, and not lookng at some setting... Timezone
> setting is often wrong, people just update their time to match the
> time of their watch. This sets the UTC time wrong too, but still
> displays the right time to the user. So if you compare this time to
> time on web servers that are allways right, and you compare the
> difference between that, then you know the timezone that is probably
> right.

 Timezone is a property of the user and some times of the session. It is not
a property of a system. Different users of a system may use different
timezones (unless they use Windows where they can't).

 Anyway, I strongly believe that the issue of providing the correct timezone
should be a concern of the end user and the browser. Any error checking and
workarounds should be performed by those two and not by the server side
scripts.

 In any way, there is no guarantee that the timezone information provided by
clients will be correct. That's why it should only be used for informational
purposes and not for security etc.


Sure, but if this setting will be incorrect for 90-95% of the time,
then there won't be a lot people that are actually gonna use it,
because why do we want to know information that is probably wrong?

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-10 Thread Stefanos Harhalakis
On Sunday 10 June 2007, Tijnema wrote:
> To get back to the point, I think that the timezone should be defined
> on what time it actually is at his PC, and what time it is on
> time.nist.gov for example, and not lookng at some setting... Timezone
> setting is often wrong, people just update their time to match the
> time of their watch. This sets the UTC time wrong too, but still
> displays the right time to the user. So if you compare this time to
> time on web servers that are allways right, and you compare the
> difference between that, then you know the timezone that is probably
> right.

  Timezone is a property of the user and some times of the session. It is not 
a property of a system. Different users of a system may use different 
timezones (unless they use Windows where they can't). 

  Anyway, I strongly believe that the issue of providing the correct timezone 
should be a concern of the end user and the browser. Any error checking and 
workarounds should be performed by those two and not by the server side 
scripts.

  In any way, there is no guarantee that the timezone information provided by 
clients will be correct. That's why it should only be used for informational 
purposes and not for security etc.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-10 Thread Tijnema

On 6/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Well, there is some use for a correct user timezone. I wrote php code that 
offers a different css file depending on the server time of day. So for example 
at noon it would use nice bright colors, and at midnight blacks and red, and 
... you get the picture. Trouble was, this representation only worked for the 
timezone the server was in, and not for the timezone the visitor was in.

Here's the simple PHP timezone code in css_rotate.php:

$hour = date("G");
//echo $hour;
switch($hour) {
   case 0: // theme: sleep
   case 1:
   case 2:
   case 3:
   case 4:
   $current_css = "sleep.css";
   break;
   case 5: // theme 'dawn'
   case 6:
   case 7:
   case 8:
   $current_css = "dawn.css";
   break;
   case 9: // theme 'morning'
   case 10:
   case 11:
   case 12:
   $current_css = "morning.css";
   break;
   case 13: // theme 'afternoon'
   case 14:
   case 15:
   case 16:
   $current_css = "afternoon.css";
   break;
   case 17: // theme 'dusk'
   case 18:
   case 19:
   case 20:
   $current_css = "dusk.css";
   break;
   case 21: // theme 'night life'
   case 22:
   case 23:
   $current_css = "night.css";
   break;
   default:
   $current_css = "generic.css";
}
//$current_css = "sleep.css"; // for testing each css file


.. and the invocation in the external css call:
include( INSTALL_DIR . "css/css_rotate.php");
LINK rel="stylesheet" type="text/css" href="css/">

.. and that produced a timezone flavored website look and feel.

I wanted to add that I have found more than one server time to be incorrectly 
set too, so you cannot count 100% on the server either, but i would give it 
odds over a user passed timezone.

sincerely,
Rob
http://phpyellow.com


From: Stefanos Harhalakis <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Sun, 10 Jun 2007 03:15:33 +0300
CC: php-general@lists.php.net
Subject: Re: [PHP] [RFC] HTTP timezone
On Sunday 10 June 2007, Richard Lynch wrote:
> On Sat, June 9, 2007 8:06 am, Stefanos Harhalakis wrote:
> > Timezone: +0200
> >
> > that will specify their timezone offset. This way scripts will be able
> > to
> > provide appropriate date/time strings/representations and/or content.
>
> It's pretty useless and unreliable since user's clocks/timezone
> settings are incorrect far too often...

I'm only considering the timezone information. I believe that this is not the
proper way to think before making a start. The fact that many user's timezone
is incorrect doesn't mean that this is not needed. Lets just hope that one
day Windows will do the right thing and keep the time in UTC while displaying
it using the appropriate timezone.



Well, in this case you could use javascript to get the time of the
client, and then update the CSS code according to the time.

To get back to the point, I think that the timezone should be defined
on what time it actually is at his PC, and what time it is on
time.nist.gov for example, and not lookng at some setting... Timezone
setting is often wrong, people just update their time to match the
time of their watch. This sets the UTC time wrong too, but still
displays the right time to the user. So if you compare this time to
time on web servers that are allways right, and you compare the
difference between that, then you know the timezone that is probably
right.

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-10 Thread Stefanos Harhalakis
On Sunday 10 June 2007, Tijnema wrote:
> On 6/9/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
> > On Sat, June 9, 2007 8:06 am, Stefanos Harhalakis wrote:
> > > Timezone: +0200
> > >
> > > that will specify their timezone offset. This way scripts will be able
> > > to
> > > provide appropriate date/time strings/representations and/or content.
> >
> > It's pretty useless and unreliable since user's clocks/timezone
> > settings are incorrect far too often...
> >
> > YMMV
>
> I agree with you, clock settings are incorrect way too often, I just
> checked my own, and I see that the time is correct, but the Timezone
> is at GMT, while i live in GMT+1, but in summer, it's GMT+2.
> That brings me to the next point, what about DST?
> I've read your complete draft, and it doesn't say anything about DST,
> What should browsers send for my country? +0100 or +0200?

In DST the offset from UTC is adjusted and thus it will become +2 in your 
case. Perhaps a note about DST would be usefull. The original idea was to use 
the POSIX 1003.1 timezone string that optionally includes the DST information 
but this introduces a lot of complexity and was changed to include just the 
current offset.

> Ps. what's the next thing we send to the browser? We already sent a
> lot of info through the user-agent header... Next year we send our
> computers specs to the server so that we get a site that is made for
> the performance of our computer?

Perhaps you didn't had a need about this in the past. Have you ever tried 
looking at graphs that include time information in them? Just have a look at 
mrtg graphs or stock graphs and try to figure what time each point is 
supposed to represent.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread info
Well, there is some use for a correct user timezone. I wrote php code that 
offers a different css file depending on the server time of day. So for example 
at noon it would use nice bright colors, and at midnight blacks and red, and 
... you get the picture. Trouble was, this representation only worked for the 
timezone the server was in, and not for the timezone the visitor was in. 

Here's the simple PHP timezone code in css_rotate.php:

$hour = date("G");
//echo $hour;
switch($hour) {
case 0: // theme: sleep
case 1: 
case 2:
case 3:
case 4:
$current_css = "sleep.css";
break;
case 5: // theme 'dawn'
case 6:
case 7:
case 8:
$current_css = "dawn.css";
break;
case 9: // theme 'morning'
case 10:
case 11:
case 12:
$current_css = "morning.css";
break;
case 13: // theme 'afternoon'
case 14:
case 15:
case 16:
$current_css = "afternoon.css";
break;
case 17: // theme 'dusk'
case 18:
case 19:
case 20:
$current_css = "dusk.css";
break;
case 21: // theme 'night life'
case 22:
case 23:
$current_css = "night.css";
break;
default:
$current_css = "generic.css";   
}
//$current_css = "sleep.css"; // for testing each css file


.. and the invocation in the external css call:
include( INSTALL_DIR . "css/css_rotate.php");
LINK rel="stylesheet" type="text/css" href="css/">

.. and that produced a timezone flavored website look and feel.

I wanted to add that I have found more than one server time to be incorrectly 
set too, so you cannot count 100% on the server either, but i would give it 
odds over a user passed timezone.

sincerely,
Rob
http://phpyellow.com


From: Stefanos Harhalakis <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Sun, 10 Jun 2007 03:15:33 +0300
CC: php-general@lists.php.net
Subject: Re: [PHP] [RFC] HTTP timezone
On Sunday 10 June 2007, Richard Lynch wrote:
> On Sat, June 9, 2007 8:06 am, Stefanos Harhalakis wrote:
> > Timezone: +0200
> >
> > that will specify their timezone offset. This way scripts will be able
> > to
> > provide appropriate date/time strings/representations and/or content.
>
> It's pretty useless and unreliable since user's clocks/timezone
> settings are incorrect far too often...

I'm only considering the timezone information. I believe that this is not the
proper way to think before making a start. The fact that many user's timezone
is incorrect doesn't mean that this is not needed. Lets just hope that one
day Windows will do the right thing and keep the time in UTC while displaying
it using the appropriate timezone. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Richard Lynch


On Sat, June 9, 2007 7:15 pm, Stefanos Harhalakis wrote:
> On Sunday 10 June 2007, Richard Lynch wrote:
>> On Sat, June 9, 2007 8:06 am, Stefanos Harhalakis wrote:
>> > Timezone: +0200
>> >
>> > that will specify their timezone offset. This way scripts will be
>> able
>> > to
>> > provide appropriate date/time strings/representations and/or
>> content.
>>
>> It's pretty useless and unreliable since user's clocks/timezone
>> settings are incorrect far too often...
>
> I'm only considering the timezone information. I believe that this is
> not the
> proper way to think before making a start. The fact that many user's
> timezone
> is incorrect doesn't mean that this is not needed. Lets just hope that
> one
> day Windows will do the right thing and keep the time in UTC while
> displaying
> it using the appropriate timezone.

I'm sorry if you read what I typed to mean "not needed" -- that's not
what I meant.

It's actually needed quite badly, really, since otherwise any dynamic
site has to either ignore user timezones or has to have every user
register just to know what their timezone is.

I meant that it was "useless" in the sense that because you'll never
know if the timezone is right or not, you won't really be able to rely
on it for anything important... Or, for that matter, most unimportant
things, as you'll end up needing to have users register anyway, as
some simply can't handle fixing their clock/timezone.

PS Os all the things MS needs to fix, internal representation in UTC
has to be pretty low on the list :-)

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Stefanos Harhalakis
On Sunday 10 June 2007, Richard Lynch wrote:
> On Sat, June 9, 2007 8:06 am, Stefanos Harhalakis wrote:
> > Timezone: +0200
> >
> > that will specify their timezone offset. This way scripts will be able
> > to
> > provide appropriate date/time strings/representations and/or content.
>
> It's pretty useless and unreliable since user's clocks/timezone
> settings are incorrect far too often...

I'm only considering the timezone information. I believe that this is not the 
proper way to think before making a start. The fact that many user's timezone 
is incorrect doesn't mean that this is not needed. Lets just hope that one 
day Windows will do the right thing and keep the time in UTC while displaying 
it using the appropriate timezone.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Tijnema

On 6/9/07, Richard Lynch <[EMAIL PROTECTED]> wrote:

On Sat, June 9, 2007 8:06 am, Stefanos Harhalakis wrote:
>   I'm currently writting and Internet Draft candidate to describe an
> HTTP
> header that will be used to transfer timezone information from
> browsers to
> servers. Compliant browsers will need to send a timezone string:
>
> Timezone: +0200
>
> that will specify their timezone offset. This way scripts will be able
> to
> provide appropriate date/time strings/representations and/or content.

It's pretty useless and unreliable since user's clocks/timezone
settings are incorrect far too often...

YMMV


I agree with you, clock settings are incorrect way too often, I just
checked my own, and I see that the time is correct, but the Timezone
is at GMT, while i live in GMT+1, but in summer, it's GMT+2.
That brings me to the next point, what about DST?
I've read your complete draft, and it doesn't say anything about DST,
What should browsers send for my country? +0100 or +0200?

Tijnema

Ps. what's the next thing we send to the browser? We already sent a
lot of info through the user-agent header... Next year we send our
computers specs to the server so that we get a site that is made for
the performance of our computer?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Richard Lynch
On Sat, June 9, 2007 8:06 am, Stefanos Harhalakis wrote:
>   I'm currently writting and Internet Draft candidate to describe an
> HTTP
> header that will be used to transfer timezone information from
> browsers to
> servers. Compliant browsers will need to send a timezone string:
>
> Timezone: +0200
>
> that will specify their timezone offset. This way scripts will be able
> to
> provide appropriate date/time strings/representations and/or content.

It's pretty useless and unreliable since user's clocks/timezone
settings are incorrect far too often...

YMMV

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Richard Lynch
On Sat, June 9, 2007 12:02 pm, Stefanos Harhalakis wrote:
> I've already thought about providing the full time but I didn't find
> any
> applications. Can you provide some examples about its usage? How can
> you tell
> whether a user has wrong time and not wrong timezone?

You can't.

You can't tell ANYTHING about the correctness of the time and timezone.

You can only tell if it's consistent with the server time, by
subtracting timezone offsets and then considering network latency and
rejecting any clock skewed by more than X seconds.

It doesn't tell you that it's right, really, but at least you can
identify a whole swath of definitively wrong clock/timezone settings,
and reject the worst of the bunch.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Richard Lynch


On Sat, June 9, 2007 11:08 am, Stut wrote:
> Stefanos Harhalakis wrote:
>> On Saturday 09 June 2007, Daniel Brown wrote:
>>> On 6/9/07, Stefanos Harhalakis <[EMAIL PROTECTED]> wrote:
   I'm currently writting and Internet Draft candidate to describe
 an HTTP
 header that will be used to transfer timezone information from
 browsers
 to servers. Compliant browsers will need to send a timezone
 string:

>>> It's a good idea, but in no way related to PHP.
>>
>>   Just wanted the opinion of PHP people/developers since PHP
>> programmers will
>> be most affected by this. Can you point me to the proper php related
>> list to
>> ask?
>
> I fail to see how "PHP programmers will be most affected by this"
> since
> it would equally apply to any web developer using any language.
>
> However, I like the idea but would modify it slightly such that it
> send
> an RFC 2822 formatted date which will include the timezone but would
> also allow the server to determine if the datetime on the client is
> wrong. This can be important for applications that make extensive use
> of
> client-side technologies such as Javascript.

This would be more useful, as the server could do time-math and
"guess" if the user's clock is totally way wrong, or if it has what
appears to be a reasonably-correct setting.

But you'll STILL have WAY too many users who will only appear to have
correct clock/TZ settings, but will, in fact, submit bug reports
because your time is "off" when it's really their computer at fault.

So now it's slightly less useless :-)

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Stefanos Harhalakis
On Saturday 09 June 2007, Stut wrote:
> Stefanos Harhalakis wrote:
>> I meant people using PHP to write programs also. I would dispute your
>> assertion that the majority of dynamic web pages are written in PHP. I
>> would accept an assertion that PHP is one of the most widely used
>> languages for web development.
>
> But this is all more off-topic than your original request.

Should we stop CCing the list?

> >> However, I like the idea but would modify it slightly such that it send
> >> an RFC 2822 formatted date which will include the timezone but would
> >> also allow the server to determine if the datetime on the client is
> >> wrong. This can be important for applications that make extensive use of
> >> client-side technologies such as Javascript.
> >
> > I've already thought about providing the full time but I didn't find any
> > applications. Can you provide some examples about its usage? How can you
> > tell whether a user has wrong time and not wrong timezone?
>
> You can't. But just because we can't immediately think of a use doesn't
> mean uses don't exist.
>
> Now, to the point. Including the time would only slightly modify RFC
> 2616 which states that "Clients SHOULD only send a Date header field in
> messages that include an entity-body, as in the case of PUT and POST
> requests, and even then it is optional" (section 14.18).
>
> I don't know the reason for that clause excluding other requests, but
> you would be well-advised to find out why before submitting your RFC. In
> any event, adding a new header seems daft to me when there is an
> existing header that is currently acceptable in certain cases that
> includes the information your new header would provide.
>
> In my opinion your RFC should recommend that "Clients SHOULD send a Date
> header with every request unless the client does not have a clock. A
> client without a clock MUST NOT send a Date header field in a  request."

I don't know the reason either but I'll ask the http-wg mailing list about it. 
As for the date, since HTTP1.1 covers this, an RFC that overlaps with it will 
not be accepted. Apart from that, it would need an RFC that would obsolete 
RFC2616 which I'd preffer not to do. Most probably we will need a new HTTP 
version since this will produce an incompatible protocol.

As for the usage of client Date/Time information, as a programmer I know that 
I'd never use this at the server side because of errors and malicious usage. 
Knowing the clients time isn't something usefull since the server side 
already knows it, assuming that the client has correct time. If the client 
side has an incorrect clock setting the why should one use this? Even if 
there is a reason, I believe that javascript would fit this need.

Finally, modifying the Date field to include the clients timezone offset would 
result once again in an incompatible protocol.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Stut

Stefanos Harhalakis wrote:

On Saturday 09 June 2007, Stut wrote:

  Just wanted the opinion of PHP people/developers since PHP programmers
will be most affected by this. Can you point me to the proper php related
list to ask?

I fail to see how "PHP programmers will be most affected by this" since
it would equally apply to any web developer using any language.


By saying PHP programmers I mean people using PHP to write programs and not 
developers of the PHP language. I'm saying 'most' since the majority of 
dynamic web pages are written in PHP. Of course anyone writting non-static 
web content will be able to use it.


I meant people using PHP to write programs also. I would dispute your 
assertion that the majority of dynamic web pages are written in PHP. I 
would accept an assertion that PHP is one of the most widely used 
languages for web development.


But this is all more off-topic than your original request.


However, I like the idea but would modify it slightly such that it send
an RFC 2822 formatted date which will include the timezone but would
also allow the server to determine if the datetime on the client is
wrong. This can be important for applications that make extensive use of
client-side technologies such as Javascript.


I've already thought about providing the full time but I didn't find any 
applications. Can you provide some examples about its usage? How can you tell 
whether a user has wrong time and not wrong timezone?


You can't. But just because we can't immediately think of a use doesn't 
mean uses don't exist.


Now, to the point. Including the time would only slightly modify RFC 
2616 which states that "Clients SHOULD only send a Date header field in 
messages that include an entity-body, as in the case of PUT and POST 
requests, and even then it is optional" (section 14.18).


I don't know the reason for that clause excluding other requests, but 
you would be well-advised to find out why before submitting your RFC. In 
any event, adding a new header seems daft to me when there is an 
existing header that is currently acceptable in certain cases that 
includes the information your new header would provide.


In my opinion your RFC should recommend that "Clients SHOULD send a Date 
header with every request unless the client does not have a clock. A 
client without a clock MUST NOT send a Date header field in a  request."


-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Stefanos Harhalakis
On Saturday 09 June 2007, Stut wrote:
> >   Just wanted the opinion of PHP people/developers since PHP programmers
> > will be most affected by this. Can you point me to the proper php related
> > list to ask?
>
> I fail to see how "PHP programmers will be most affected by this" since
> it would equally apply to any web developer using any language.

By saying PHP programmers I mean people using PHP to write programs and not 
developers of the PHP language. I'm saying 'most' since the majority of 
dynamic web pages are written in PHP. Of course anyone writting non-static 
web content will be able to use it.

> However, I like the idea but would modify it slightly such that it send
> an RFC 2822 formatted date which will include the timezone but would
> also allow the server to determine if the datetime on the client is
> wrong. This can be important for applications that make extensive use of
> client-side technologies such as Javascript.

I've already thought about providing the full time but I didn't find any 
applications. Can you provide some examples about its usage? How can you tell 
whether a user has wrong time and not wrong timezone?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Stut

Stefanos Harhalakis wrote:

On Saturday 09 June 2007, Daniel Brown wrote:

On 6/9/07, Stefanos Harhalakis <[EMAIL PROTECTED]> wrote:

  I'm currently writting and Internet Draft candidate to describe an HTTP
header that will be used to transfer timezone information from browsers
to servers. Compliant browsers will need to send a timezone string:


It's a good idea, but in no way related to PHP.


  Just wanted the opinion of PHP people/developers since PHP programmers will 
be most affected by this. Can you point me to the proper php related list to 
ask?


I fail to see how "PHP programmers will be most affected by this" since 
it would equally apply to any web developer using any language.


However, I like the idea but would modify it slightly such that it send 
an RFC 2822 formatted date which will include the timezone but would 
also allow the server to determine if the datetime on the client is 
wrong. This can be important for applications that make extensive use of 
client-side technologies such as Javascript.


-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Stefanos Harhalakis
On Saturday 09 June 2007, Daniel Brown wrote:
> On 6/9/07, Stefanos Harhalakis <[EMAIL PROTECTED]> wrote:
> >   I'm currently writting and Internet Draft candidate to describe an HTTP
> > header that will be used to transfer timezone information from browsers
> > to servers. Compliant browsers will need to send a timezone string:
> >
> It's a good idea, but in no way related to PHP.

  Just wanted the opinion of PHP people/developers since PHP programmers will 
be most affected by this. Can you point me to the proper php related list to 
ask?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Daniel Brown

On 6/9/07, Stefanos Harhalakis <[EMAIL PROTECTED]> wrote:

Hello there,

  I'm currently writting and Internet Draft candidate to describe an HTTP
header that will be used to transfer timezone information from browsers to
servers. Compliant browsers will need to send a timezone string:

Timezone: +0200

that will specify their timezone offset. This way scripts will be able to
provide appropriate date/time strings/representations and/or content.

  I'm sending this email as a request for comments. Any ideas/suggestions will
be greatly appreciated and will help in forming the final document.

  You can find the current draft in:
http://www.it.teithe.gr/~v13/draft-sharhalakis-httptz-02.txt

  This and all future versions will be available in the IETF I-D database at:
https://datatracker.ietf.org/public/idindex.cgi
Just search for 'httptz'. Revision 02 will be available really soon in the I-D
DB too.

  Please CC me since I'm not subscribed to the mailing list.

Harhalakis Stefanos

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




   It's a good idea, but in no way related to PHP.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] [RFC] HTTP timezone

2007-06-09 Thread Stefanos Harhalakis
Hello there,

  I'm currently writting and Internet Draft candidate to describe an HTTP 
header that will be used to transfer timezone information from browsers to 
servers. Compliant browsers will need to send a timezone string:

Timezone: +0200

that will specify their timezone offset. This way scripts will be able to 
provide appropriate date/time strings/representations and/or content.

  I'm sending this email as a request for comments. Any ideas/suggestions will 
be greatly appreciated and will help in forming the final document.

  You can find the current draft in: 
http://www.it.teithe.gr/~v13/draft-sharhalakis-httptz-02.txt

  This and all future versions will be available in the IETF I-D database at: 
https://datatracker.ietf.org/public/idindex.cgi
Just search for 'httptz'. Revision 02 will be available really soon in the I-D 
DB too.

  Please CC me since I'm not subscribed to the mailing list.

Harhalakis Stefanos

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php