Timezones on HPUX - Mailing list pgsql-general

From Gilbert Wong
Subject Timezones on HPUX
Date
Msg-id F110TcjJxWY5pCxlICS00001d14@hotmail.com
Whole thread Raw
Responses Re: Timezones on HPUX  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I am running PostgreSQL 7.0.3 on HPUX 11.0.  I get the expected behavior if
my PGTZ environment variable is not set:

select current_timestamp;

       timestamp
------------------------
2001-05-29 12:56:16-04
(1 row)


The I ran the date command in the shell and received the following output:

Tue May 29 09:57:09 PDT 2001

I have my TZ enviornment set to the correct value PST8PDT.  When I set the
PGTZ variable to PST8PDT, I also get the correct time output:

select current_timestamp;

       timestamp
------------------------
2001-05-29 09:58:26-07
(1 row)


So this works fine if I'm using psql.  However, I am using PostgreSQL in
conjunction with AOLServer and I get the incorrect date/time when I run the
current_timestamp query from a .tcl page in AOLServer.

Here is a snippet from my init.d script:

su - $PGUSER -c "$PGHOME/bin/pg_ctl -o '$PGOPTS' -D $PGHOME/data start"

Is there any way I can pass the PGTZ variable when I execute this script?
Thanks.

Gilbert








_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


pgsql-general by date:

Previous
From: "Tim Barnard"
Date:
Subject: Re: Help with C++
Next
From: "Mihai Gheorghiu"
Date:
Subject: Modifying a table that other tables refer to for foreigh key