pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to set time zone permanently
5+ messages / 4 participants
[nested] [flat]
* How to set time zone permanently
@ 2002-02-20 14:45 Pam Wampler <Pam_Wampler@taylorwhite.com>
0 siblings, 1 reply; 5+ messages in thread
From: Pam Wampler @ 2002-02-20 14:45 UTC (permalink / raw)
To: pgsql-admin
How do you set the time zone permanently in postgresql?
I can use the set time zone 'EST' in psql on template1
show time zone & it shows EST
exit
then go back into psql & do a show time zone & it says time zone unknown
Where do I & how do I permanently set the time zone?
thanks
Pam Wamper
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: How to set time zone permanently
@ 2002-02-20 15:40 Tom Lane <tgl@sss.pgh.pa.us>
parent: Pam Wampler <Pam_Wampler@taylorwhite.com>
0 siblings, 1 reply; 5+ messages in thread
From: Tom Lane @ 2002-02-20 15:40 UTC (permalink / raw)
To: Pam Wampler <Pam_Wampler@taylorwhite.com>; +Cc: pgsql-admin
Pam Wampler <Pam_Wampler@taylorwhite.com> writes:
> Where do I & how do I permanently set the time zone?
I think best/only way right now is to set the TZ environment variable
before starting the postmaster. The TimeZone variable ought to be
settable from postgresql.conf, but for some reason it's not there now.
BTW, if the system default timezone is not already the way you want it,
you might consider making it so rather than putting a special hack into
the Postgres start script. This usually involves creating or changing
a configuration file somewhere under /etc ...
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: How to set time zone permanently
@ 2002-02-20 15:50 Pam Wampler <Pam_Wampler@taylorwhite.com>
0 siblings, 0 replies; 5+ messages in thread
From: Pam Wampler @ 2002-02-20 15:50 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; Pam Wampler <Pam_Wampler@taylorwhite.com>; +Cc: pgsql-admin
Thanks Tom That worked !!! I added /etc/TIMEZONE & put TZ=EST export TZ in
that file
then in /etc/profile I added
#prw added 2/20/2002 for timezone
# Set the TIMEZONE
if [ -r /etc/TIMEZONE ]
then
. /etc/TIMEZONE
then logged out as postgres user & back in & stopped & restarted using
pg_ctl
and did show time zone & it said EST
thanks & thanks to this wonderful messaging -- you guys are terrific to help
out like this
Pam
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Wednesday, February 20, 2002 10:40 AM
To: Pam Wampler
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] How to set time zone permanently
Pam Wampler <Pam_Wampler@taylorwhite.com> writes:
> Where do I & how do I permanently set the time zone?
I think best/only way right now is to set the TZ environment variable
before starting the postmaster. The TimeZone variable ought to be
settable from postgresql.conf, but for some reason it's not there now.
BTW, if the system default timezone is not already the way you want it,
you might consider making it so rather than putting a special hack into
the Postgres start script. This usually involves creating or changing
a configuration file somewhere under /etc ...
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: How to set time zone permanently
@ 2002-02-20 21:12 Bruce Momjian <pgman@candle.pha.pa.us>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 5+ messages in thread
From: Bruce Momjian @ 2002-02-20 21:12 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Pam Wampler <Pam_Wampler@taylorwhite.com>; pgsql-admin
Tom Lane wrote:
> Pam Wampler <Pam_Wampler@taylorwhite.com> writes:
> > Where do I & how do I permanently set the time zone?
>
> I think best/only way right now is to set the TZ environment variable
> before starting the postmaster. The TimeZone variable ought to be
> settable from postgresql.conf, but for some reason it's not there now.
>
> BTW, if the system default timezone is not already the way you want it,
> you might consider making it so rather than putting a special hack into
> the Postgres start script. This usually involves creating or changing
> a configuration file somewhere under /etc ...
Actually, I think there are three levels: system timezone, TZ, and PGTZ
environment variables. The first is all processes, the second is all
processes that have TZ set, and PGTZ affects only PostgreSQL and not
other applications.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: How to set time zone permanently
@ 2002-02-21 09:20 Morten Sickel <Morten.Sickel@nrpa.no>
0 siblings, 0 replies; 5+ messages in thread
From: Morten Sickel @ 2002-02-21 09:20 UTC (permalink / raw)
To: pgsql-admin
Bruce Momjian wrote:
> Actually, I think there are three levels: system timezone,
> TZ, and PGTZ environment variables. The first is all processes, the
second is all
> processes that have TZ set, and PGTZ affects only PostgreSQL and not
> other applications.
But, as far as I can see, these variables are taken into account at client
level. I.e. I have to set PGTZ=WST for the users who are running the
clients, not as the postgres user who runs the server (I have at least not
managed that, I have tried to set the variables in the pg startup script and
in the .profile of the postgres user to no avail). When I am running windows
clients, (ipgsql and a couple of things I have written in Delphi) they don't
seem to care about the time zone. Is it any way I can tell the pgodbc driver
or the pglibs on Windows pcs which time zone to use when connecting to the
server?
best regards
--
Morten Sickel
Norwegian Radiation Protection Authority
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2002-02-21 09:20 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-02-20 14:45 How to set time zone permanently Pam Wampler <Pam_Wampler@taylorwhite.com>
2002-02-20 15:40 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-02-20 21:12 ` Bruce Momjian <pgman@candle.pha.pa.us>
2002-02-20 15:50 Re: How to set time zone permanently Pam Wampler <Pam_Wampler@taylorwhite.com>
2002-02-21 09:20 Re: How to set time zone permanently Morten Sickel <Morten.Sickel@nrpa.no>
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