Thread: timestamps over the web - suggestions

timestamps over the web - suggestions

From
chester c young
Date:
My server is based MST, but web clients from Maine to Hawaii, and they wish to see timestamps based in their own
locale.<br/><br />Can anyone tell me how they're handling this?  (sorry - can't get rid of my clients)<br /><p><hr
size="1"/>Do you Yahoo!?<br /> Get on board. <a
href="http://us.rd.yahoo.com/evt=40791/*http://advision.webevents.yahoo.com/mailbeta">You'reinvited</a> to try the new
Yahoo!Mail. 

Re: timestamps over the web - suggestions

From
"Aaron Bono"
Date:
You should probably handle this at the application level.  How you go about it will depend on what programming language you use.

If you don't like that, check out the timezone function:
http://www.postgresql.org/docs/8.0/static/runtime-config.html#GUC-TIMEZONE

See also for an example:
http://www.varlena.com/GeneralBits/3.php
on how to use SET:
    set time zone 'PST8PDT';
    select now();

Now if I could just find a list of time zones to use...

On 10/3/06, chester c young < 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)


==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
   http://codeelixir.com
==================================================================

Re: timestamps over the web - suggestions

From
ljb
Date:
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>


Re: timestamps over the web - suggestions

From
Bruno Wolff III
Date:
On Tue, Oct 03, 2006 at 14:44:12 -0700, chester c young <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)

Do they login in as themselves? If so, perhaps storing a timezone for each
client would work in your case.