Re: timestamps over the web - suggestions - Mailing list pgsql-sql

From ljb
Subject Re: timestamps over the web - suggestions
Date
Msg-id efv357$2qf4$1@news.hub.org
Whole thread Raw
In response to timestamps over the web - suggestions  (chester c young <chestercyoung@yahoo.com>)
List pgsql-sql
chestercyoung@yahoo.com wrote:
>
> My server is based MST, but web clients from Maine to Hawaii, and they wish to see timestamps based in their own
locale.
>
> Can anyone tell me how they're handling this?  (sorry - can't get rid of my clients)

Here's a bit of JavaScript that might work for you. It sets a cookie to the
user's timezone offset (vs GMT, in minutes). You put something like this on
an initial page (portal, login page, whatever), and then subsequent pages
will be requested along with the timezone cookie. If you are using PHP, for
example, your scripts just access $_COOKIE['timezone'] and adjust things
accordingly for the user's timezone.

<script language="JavaScript1.1"><!--
var d = new Date();
document.cookie = "timezone="+d.getTimezoneOffset();
--></script>


pgsql-sql by date:

Previous
From: "Aaron Bono"
Date:
Subject: Re: timestamps over the web - suggestions
Next
From: Bruno Wolff III
Date:
Subject: Re: Fw: How to FindNearest