Re: Time Zone design issues
От
Alvaro Herrera
Тема
Re: Time Zone design issues
Дата
Msg-id
20070910202100.GA30799@alvh.no-ip.org
Ответ на
Re: Time Zone design issues (novnov)
Список
Дерево обсуждения
Time Zone design issues novnov <novnovice@gmail.com>
Re: Time Zone design issues Tom Lane <tgl@sss.pgh.pa.us>
Re: Time Zone design issues Ron Johnson <ron.l.johnson@cox.net>
Re: Time Zone design issues novnov <novnovice@gmail.com>
Re: Time Zone design issues Martijn van Oosterhout <kleptog@svana.org>
Re: Time Zone design issues novnov <novnovice@gmail.com>
Re: Time Zone design issues Martijn van Oosterhout <kleptog@svana.org>
Re: Time Zone design issues Richard Huxton <dev@archonet.com>
Re: Time Zone design issues "Scott Marlowe" <scott.marlowe@gmail.com>
Re: Time Zone design issues novnov <novnovice@gmail.com>
Re: Time Zone design issues Martijn van Oosterhout <kleptog@svana.org>
Re: Time Zone design issues Alvaro Herrera <alvherre@commandprompt.com>
Re: Time Zone design issues Ron Johnson <ron.l.johnson@cox.net>
Re: Time Zone design issues Tom Lane <tgl@sss.pgh.pa.us>
Re: Time Zone design issues Ron Johnson <ron.l.johnson@cox.net>
Re: Time Zone design issues Gregory Stark <stark@enterprisedb.com>
Re: Time Zone design issues Steve Atkins <steve@blighty.com>
Re: Time Zone design issues "Trevor Talbot" <quension@gmail.com>
Re: Time Zone design issues Troy Rasiah <troyr@vicnet.net.au>
Re: Time Zone design issues Ron Johnson <ron.l.johnson@cox.net>
Re: Time Zone design issues Alvaro Herrera <alvherre@commandprompt.com>
novnov escribió: > > I think I get the picture; this post is the closest to making sense to me (my > lack of understanding is the issue, obviously). But: > > What's the postgresql client, in a web app? > > When you write "The web app sets timezone='EST5EDT' and inserts a time of > '2007-07-11 12:30:00'." that's the black box that I'm asking about. There is > no web app other than the one I am writing. So, I think it means I need to > write code in my web app to handle the conversion of the postgres stored UTC > into user-relevant time, with their local time zone etc. You are misunderstanding the "sets timezone=". What it means is that you call the following SQL command: SET timezone TO 'EST5EDT'; early in your webapp code. The value to use, you get from the user profile (stored in a table perhaps). > If that's so, what I'm asking about is one the webapp side and perhaps > people here are not so used to dealing with that. I don't know. Just > like one of the other (much appreciated) responders in this thread > suggested, the user's browser is likely offering the user's tz > info...but I am interested in seeing someone's mature system for > returning the user's local time based their tz as stored in their > profile. I wouldn't trust the browser's TZ, and you would need a way to override it. So storing it in a table seems the easiest way. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
В списке pgsql-general по дате отправления