New header proposition to the HTTP protocol : TimeZone

From OoKoo.org

Jump to: navigation, search

Contents

Status

This proposition is still in its presentation stage. discussions are open.

Preface

The HTTP protocol currently provides various informations to the remote server. Those informations have the purpose of improving the user's experience on the server webpages (eg. Accept-Languages allows the server to select the right page language for a visitor).

However, proposing content for people from many horizons still presents a problem: the timezone. It's not really an option to always ask the user about his timezone when he comes on a new website.

Many applications are displaying hours to the clients. This is the case of forums, blogs, and a whole lot of other applications which use server-side programming languages like PHP, which contains a function for this case: date_default_timezone_set, which allows to set the current timezone of date functions. It wouldn't be that hard to tell PHP to get the timezone from the headers and use it automatically.

This is why I propose here to add this information to the HTTP protocol.

Technical realisation

Data transmission

The header would look like that (example taken: Paris in France):

Accept-TimeZone: Europe/Paris

It would be also possible to transmit Timezone information using RFC 822 :

Accept-TimeZone: +0200

If no timezone is given by the server, or if it is incorrect, the server may choose to use its own timezone, or the GMT zone.

Please also note that the field name is not definitive.

The question of also transmitting the current DST setting is still not answered.

Compatibility

Adding a new header which would be always sent by the client is not really a problem for the HTTP protocol, since it was designed to support this kind of modifications. There's no matter on this side.

For the windows/linux compatibility, there shouldn't be any problem either, since this is already discussed and fixed in many other projects.

Security

For some OSes (UNIX), the timezone informations are stored in files (typically /usr/share/zoneinfo/). There shouldn't be any risk for attempt of checking if other files exists, however an additionnal check wouldn't be bad.

Implementation

Implementation in known products such as Firefox shouldn't be a problem, however there's still the problem of knowing if Microsoft will accept to add this to its client.

Personal tools
In other languages