pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
timestamps over the web - suggestions
4+ messages / 4 participants
[nested] [flat]

* timestamps over the web - suggestions
@ 2006-10-03 21:44  chester c young <chestercyoung@yahoo.com>
  0 siblings, 3 replies; 4+ messages in thread

From: chester c young @ 2006-10-03 21:44 UTC (permalink / raw)
  To: pgsql-sql

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 you Yahoo!?
 Get on board. You're invited to try the new Yahoo! Mail.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: timestamps over the web - suggestions
@ 2006-10-04 01:15  Aaron Bono <postgresql@aranya.com>
  parent: chester c young <chestercyoung@yahoo.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Aaron Bono @ 2006-10-04 01:15 UTC (permalink / raw)
  To: chester c young <chestercyoung@yahoo.com>; +Cc: pgsql-sql

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
==================================================================

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: timestamps over the web - suggestions
@ 2006-10-04 01:35  ljb <lbayuk@pobox.com>
  parent: chester c young <chestercyoung@yahoo.com>
  2 siblings, 0 replies; 4+ messages in thread

From: ljb @ 2006-10-04 01:35 UTC (permalink / raw)
  To: 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>



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: timestamps over the web - suggestions
@ 2006-10-06 18:27  Bruno Wolff III <bruno@wolff.to>
  parent: chester c young <chestercyoung@yahoo.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Bruno Wolff III @ 2006-10-06 18:27 UTC (permalink / raw)
  To: chester c young <chestercyoung@yahoo.com>; +Cc: pgsql-sql

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.



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2006-10-06 18:27 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-10-03 21:44 timestamps over the web - suggestions chester c young <chestercyoung@yahoo.com>
2006-10-04 01:15 ` Aaron Bono <postgresql@aranya.com>
2006-10-04 01:35 ` ljb <lbayuk@pobox.com>
2006-10-06 18:27 ` Bruno Wolff III <bruno@wolff.to>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox