Search Postgresql Archives

Re: Time Zone design issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Sep 11, 2007, at 2:48 AM, Gregory Stark wrote:

"Ron Johnson" <ron.l.johnson@xxxxxxx> writes:

On 09/10/07 19:50, Tom Lane wrote:

This whole sub-thread actually is predicated on an assumption not
in evidence, which is that there is any browser anywhere that will
tell the http server timezone information.  I'm quite sure no such
thing is required by the http standard.

I'm really surprised.

I think all you get is the localized language. If it's localized to a
particular country then that might be good enough for a guess from some
countries but there's not much you can do with en_US or ru_RU.

I think most big commercial sites that decide they need this just buy access to one of the ip to geographic location services which are far from perfect but in my experience are plenty good enough to get a reasonable time zone.

Or, more likely, use one of several approaches to either get the
timezone from the browser or get the browsers view of localtime
and do a little math on the server. Javascript, mostly.

(Though, AIUI, if you're using Javascript the elegant trick is to send
UTC qpoch time to the browser and have it do the rendering to the local timezone
anyway).

Cheers,
  Steve




---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux