Re: Time Zone design issues - Mailing list pgsql-general

From Steve Atkins
Subject Re: Time Zone design issues
Date
Msg-id CC330E95-2ACF-455F-8CCF-FE0B150B2ED8@blighty.com
Whole thread Raw
In response to Re: Time Zone design issues  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-general
On Sep 11, 2007, at 2:48 AM, Gregory Stark wrote:

> "Ron Johnson" <ron.l.johnson@cox.net> 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




pgsql-general by date:

Previous
From: Leonel
Date:
Subject: Re: Ubuntu libraries needed
Next
From: Ron Johnson
Date:
Subject: Re: Hardware recommendation: which is best